aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/sync-tpc
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-11-11 14:42:05 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-11-11 14:42:05 -0200
commit5f682f4a1a4b5d09713bafdc1a6ee56ca2fd9c7c (patch)
tree57abad9d4d0405656aa03e8d1d1d299f0b5dda5a /share/hydractl/sync-tpc
parent1202b38ce04db3be992d9c86054365351acdc437 (diff)
downloadhydra-5f682f4a1a4b5d09713bafdc1a6ee56ca2fd9c7c.tar.gz
hydra-5f682f4a1a4b5d09713bafdc1a6ee56ca2fd9c7c.tar.bz2
Change sync-tpc and sync-media-remotes params
Diffstat (limited to 'share/hydractl/sync-tpc')
-rwxr-xr-xshare/hydractl/sync-tpc11
1 files changed, 6 insertions, 5 deletions
diff --git a/share/hydractl/sync-tpc b/share/hydractl/sync-tpc
index bdedf35..6186e98 100755
--- a/share/hydractl/sync-tpc
+++ b/share/hydractl/sync-tpc
@@ -5,12 +5,13 @@
# Parameters
BASENAME="$0"
-DEST="$1"
-MEDIA="/var/cache/media"
+TPC="$1"
+DEST="/media/$1"
+MEDIA="$DEST/var/cache/$TPC/media"
# Syntax
-if [ -z "$DEST" ]; then
- echo "usage: $BASENAME <dest>"
+if [ -z "$TPC" ]; then
+ echo "usage: $BASENAME <tpc>"
exit 1
elif [ ! -d "$DEST" ]; then
echo "folder $DEST does not exist."
@@ -43,4 +44,4 @@ $SUDO cp -a /etc/wicd/manager-settings.conf $DEST/etc/wicd/manager-set
$SUDO cp -a /etc/udev/rules.d/70-persistent-net.rules $DEST/etc/udev/rules.d/70-persistent-net.rules
# Sync media remotes
-hydractl sync-media-remotes $DEST
+hydractl sync-media-remotes $MEDIA