summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-12-31 18:32:16 -0200
committerSilvio Rhatto <rhatto@riseup.net>2012-12-31 18:32:16 -0200
commitc17805126ebbe17dabe4ba0bb966469c4439c24d (patch)
treeac9fe327bf2dfdf27145528a1dcdeb781ac1cfba /share
parentcc76ba613040bb74b275bd755b4e7fc0d2e4bc5c (diff)
downloadhydra-c17805126ebbe17dabe4ba0bb966469c4439c24d.tar.gz
hydra-c17805126ebbe17dabe4ba0bb966469c4439c24d.tar.bz2
Local variables
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/bootless8
1 files changed, 6 insertions, 2 deletions
diff --git a/share/hydra/bootless b/share/hydra/bootless
index 86fd928..eedcf08 100755
--- a/share/hydra/bootless
+++ b/share/hydra/bootless
@@ -37,7 +37,7 @@ function hydra_bootless_make {
hydra_bootless_folder
# Set sudo config
- local sudo
+ local sudo device rsync
if [ "`whoami`" != 'root' ]; then
sudo="sudo"
fi
@@ -70,6 +70,10 @@ EOF
device=$1
fi
+ if [ "$2" == "--rsync" ]; then
+ rsync="true"
+ fi
+
usbdevice=`echo ${device} | sed -e s/[0-9]\$//g`
# Target device consistency check
@@ -135,7 +139,7 @@ EOF
fi
# Copy data
- if [ "$2" == "--rsync" ]; then
+ if [ "$rsync" == "true" ]; then
$sudo rsync -Cav ${BOOTLESS_DIR}/ ${tmpdir}/boot/
else
$sudo git clone --depth=1 ${BOOTLESS_DIR} ${tmpdir}/boot