diff options
author | Micah Anderson <micah@riseup.net> | 2007-02-23 18:04:04 +0000 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2007-02-23 18:04:04 +0000 |
commit | 05c26446ed65681528387f6c66473c61eebe7224 (patch) | |
tree | bbbd9bfce2bda17e0d399d1c97959c4a2937c6eb /src | |
parent | d15a347be54fea3ae44c595b454b22fb41149271 (diff) | |
download | backupninja-05c26446ed65681528387f6c66473c61eebe7224.tar.gz backupninja-05c26446ed65681528387f6c66473c61eebe7224.tar.bz2 |
updated autotools abstraction to properly pick up different awk, sed,
and md5sum locations
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rwxr-xr-x | src/backupninja.in | 12 | ||||
-rwxr-xr-x | src/ninjahelper.in | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 44b3148..f0cb69c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,10 +9,12 @@ EXTRA_DIST = backupninja.in ninjahelper.in edit = sed \ -e "s,@CFGDIR\@,$(CFGDIR),g" \ -e "s,@BASH\@,$(BASH),g" \ + -e "s,@AWK\@,$(AWK),g" \ + -e "s,@SED\@,$(SED),g" \ -e 's,@datadir\@,$(pkgdatadir),g' \ -e "s,@libdir\@,$(pkglibdir),g" \ -e 's,@localstatedir\@,$(localstatedir),g' \ - -e 's,@prefix\@,$(prefix),g' + -e 's,@prefix\@,$(prefix),g' #install-exec-hook: diff --git a/src/backupninja.in b/src/backupninja.in index 6295198..02ffa25 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -34,7 +34,7 @@ function setupcolors () { function colorize () { if [ "$usecolors" == "yes" ]; then - local typestr=`echo "$@" | sed 's/\(^[^:]*\).*$/\1/'` + local typestr=`echo "$@" | @SED@ 's/\(^[^:]*\).*$/\1/'` [ "$typestr" == "Debug" ] && type=0 [ "$typestr" == "Info" ] && type=1 [ "$typestr" == "Warning" ] && type=2 @@ -68,7 +68,7 @@ function printmsg() { type=$1 shift if [ $type == 100 ]; then - typestr=`echo "$@" | sed 's/\(^[^:]*\).*$/\1/'` + typestr=`echo "$@" | @SED@ 's/\(^[^:]*\).*$/\1/'` [ "$typestr" == "Debug" ] && type=0 [ "$typestr" == "Info" ] && type=1 [ "$typestr" == "Warning" ] && type=2 @@ -204,7 +204,7 @@ function isnow() { whendayofweek=$1; at=$2; whentime=$3; whenday=`toint "$whendayofweek"` whendayofweek=`tolower "$whendayofweek"` - whentime=`echo "$whentime" | sed 's/:[0-9][0-9]$//' | sed -r 's/^([0-9])$/0\1/'` + whentime=`echo "$whentime" | @SED@ 's/:[0-9][0-9]$//' | @SED@ -r 's/^([0-9])$/0\1/'` if [ "$whendayofweek" == "everyday" -o "$whendayofweek" == "daily" ]; then whendayofweek=$nowdayofweek @@ -409,7 +409,7 @@ if [ ! -r "$conffile" ]; then fi # find $libdirectory -libdirectory=`grep '^libdirectory' $conffile | awk '{print $3}'` +libdirectory=`grep '^libdirectory' $conffile | @AWK@ '{print $3}'` if [ -z "$libdirectory" ]; then if [ -d "@libdir@" ]; then libdirectory="@libdir@" @@ -541,9 +541,9 @@ if [ $doit == 1 ]; then if [ "$reportspace" == "yes" ]; then previous="" for i in $(ls "$configdirectory"); do - backuploc=$(grep ^directory "$configdirectory"/"$i" | awk '{print $3}') + backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}') if [ "$backuploc" != "$previous" ]; then - mountdev=$(mount | grep "$backuploc" | awk '{print $1}') + mountdev=$(mount | grep "$backuploc" | @AWK@ '{print $1}') df -h "$mountdev" previous="$backuploc" fi diff --git a/src/ninjahelper.in b/src/ninjahelper.in index 26d2856..040727b 100755 --- a/src/ninjahelper.in +++ b/src/ninjahelper.in @@ -183,7 +183,7 @@ if [ ! -r "$conffile" ]; then fi # find $libdirectory -libdirectory=`grep '^libdirectory' $conffile | awk '{print $3}'` +libdirectory=`grep '^libdirectory' $conffile | @AWK@ '{print $3}'` if [ -z "$libdirectory" ]; then if [ -d "@libdir@" ]; then libdirectory="@libdir@" |