aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-06-02 20:46:25 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-06-02 20:46:25 -0300
commit3bd35bf3be01d87184aa4431f9bdb4892d832f95 (patch)
tree385c6de7fec8dd172129708e508b635de34ffc00 /share/hydractl
parent2471d64295214cbc03cb499fda9d8744a5e71beb (diff)
downloadhydra-3bd35bf3be01d87184aa4431f9bdb4892d832f95.tar.gz
hydra-3bd35bf3be01d87184aa4431f9bdb4892d832f95.tar.bz2
Ensure the media folder exist at sync-tpc
Diffstat (limited to 'share/hydractl')
-rwxr-xr-xshare/hydractl/sync-tpc9
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