]> git.wh0rd.org Git - home.git/commitdiff
better flock boiler plate that passes args correctly
authorMike Frysinger <vapier@gentoo.org>
Wed, 26 Dec 2012 19:16:27 +0000 (14:16 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 26 Dec 2012 19:16:27 +0000 (14:16 -0500)
.bin/gentoo-sync

index 1d76859398a13120c9c70a7fc837e9a8eb117a82..59f923ca0febc0d74aa42d7a8f114a294164c142 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-[[ ${FLOCKER} != $0 ]] && exec env FLOCKER=$0 flock -en $0 -c "$0 $*" || :
+[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@" || :
 
 logdir="/var/log"
 sync_log="${logdir}/rsync.log"