]> gitweb.fluxo.info Git - hydra.git/commitdiff
Local variables
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 31 Dec 2012 20:32:16 +0000 (18:32 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 31 Dec 2012 20:32:16 +0000 (18:32 -0200)
share/hydra/bootless

index 86fd928f90845e0c1279b178efe9422b6be8133b..eedcf085807ae275bd2f228a2f774b036f08867c 100755 (executable)
@@ -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