solaris-compatibility-fixes.
This commit is contained in:
parent
6fa36f0dbd
commit
82cb7d7012
3
Makefile
3
Makefile
|
@ -20,10 +20,11 @@ testdir/.lmtab: testdir
|
||||||
|
|
||||||
testdir/.prepare: testdir testdir/.lmtab
|
testdir/.prepare: testdir testdir/.lmtab
|
||||||
touch $</aaaaaaaaaaaaa.log
|
touch $</aaaaaaaaaaaaa.log
|
||||||
for f in `seq 1 10` ; do touch $</"logfile-$$f-`date +%Y%m%d%H%M%S`.log" || exit 1 ; done
|
for f in 1 2 3 4 5 6 7 8 9 10 ; do touch $</"logfile-$$f-`date +%Y%m%d%H%M%S`.log" || exit 1 ; done
|
||||||
touch $</no_log
|
touch $</no_log
|
||||||
touch $</no.log.txt
|
touch $</no.log.txt
|
||||||
touch $@
|
touch $@
|
||||||
|
.PHONY: testdir/.prepare
|
||||||
|
|
||||||
test: testdir/.prepare testdir/.lmtab
|
test: testdir/.prepare testdir/.lmtab
|
||||||
cd testdir ; ../logmanager -nc .lmtab
|
cd testdir ; ../logmanager -nc .lmtab
|
||||||
|
|
|
@ -28,7 +28,7 @@ do
|
||||||
done
|
done
|
||||||
shift `expr $OPTIND - 1`
|
shift `expr $OPTIND - 1`
|
||||||
|
|
||||||
if ! [ 0 -lt $# ]
|
if [ 0 -ge $# ]
|
||||||
then
|
then
|
||||||
echo "Error: DIR expected"
|
echo "Error: DIR expected"
|
||||||
help
|
help
|
||||||
|
|
|
@ -22,6 +22,9 @@ do
|
||||||
a) a="$OPTARG" ; shift ;;
|
a) a="$OPTARG" ; shift ;;
|
||||||
i) i=-i ;;
|
i) i=-i ;;
|
||||||
n) n=echo ;;
|
n) n=echo ;;
|
||||||
|
*) echo "Unknown Option: $o" >&2
|
||||||
|
help
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift `expr $OPTIND - 1`
|
shift `expr $OPTIND - 1`
|
||||||
|
|
10
logmanager
10
logmanager
|
@ -20,9 +20,9 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
with_n() {
|
with_n() {
|
||||||
local cmd=$1
|
__cmd=$1
|
||||||
shift
|
shift
|
||||||
"$cmd" -n "$@"
|
"$__cmd" -n "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts hc:a:r:z:C:nN o
|
while getopts hc:a:r:z:C:nN o
|
||||||
|
@ -71,8 +71,8 @@ do
|
||||||
do
|
do
|
||||||
e="`basename "${exp}"`"
|
e="`basename "${exp}"`"
|
||||||
exp="`dirname "${exp}"`"
|
exp="`dirname "${exp}"`"
|
||||||
$cmd $archiver -e "$e" "$dir"
|
$cmd $archiver -e "$e" -- "$dir"
|
||||||
done
|
done
|
||||||
$cmd $compressor "$dir"
|
$cmd $compressor -- "$dir"
|
||||||
[ 0 = "$age" ] || $cmd $cleaner "$age" "$dir"
|
[ 0 = "$age" ] || $cmd $cleaner "$age" -- "$dir"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue