diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-06-02 20:46:25 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-06-02 20:46:25 -0300 |
commit | 3bd35bf3be01d87184aa4431f9bdb4892d832f95 (patch) | |
tree | 385c6de7fec8dd172129708e508b635de34ffc00 /share/hydractl | |
parent | 2471d64295214cbc03cb499fda9d8744a5e71beb (diff) | |
download | hydra-3bd35bf3be01d87184aa4431f9bdb4892d832f95.tar.gz hydra-3bd35bf3be01d87184aa4431f9bdb4892d832f95.tar.bz2 |
Ensure the media folder exist at sync-tpc
Diffstat (limited to 'share/hydractl')
-rwxr-xr-x | share/hydractl/sync-tpc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/share/hydractl/sync-tpc b/share/hydractl/sync-tpc index 09c4adc..31a29ae 100755 --- a/share/hydractl/sync-tpc +++ b/share/hydractl/sync-tpc @@ -57,5 +57,14 @@ if [ -d "/etc/wicd" ]; then $SUDO cp -a /etc/wicd/wireless-settings.conf $DEST/etc/wicd/wireless-settings.conf fi +# Ensure the media folder exist +if [ ! -d "$MEDIA" ]; then + $SUDO mkdir -p $MEDIA + + if [ "$USER" != 'root' ]; then + $SUDO chown $USER.$USER $MEDIA + fi +fi + # Sync media remotes hydractl sync-media-remotes $MEDIA |