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
|
||||
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.txt
|
||||
touch $@
|
||||
.PHONY: testdir/.prepare
|
||||
|
||||
test: testdir/.prepare testdir/.lmtab
|
||||
cd testdir ; ../logmanager -nc .lmtab
|
||||
|
|
|
@ -28,7 +28,7 @@ do
|
|||
done
|
||||
shift `expr $OPTIND - 1`
|
||||
|
||||
if ! [ 0 -lt $# ]
|
||||
if [ 0 -ge $# ]
|
||||
then
|
||||
echo "Error: DIR expected"
|
||||
help
|
||||
|
|
|
@ -22,6 +22,9 @@ do
|
|||
a) a="$OPTARG" ; shift ;;
|
||||
i) i=-i ;;
|
||||
n) n=echo ;;
|
||||
*) echo "Unknown Option: $o" >&2
|
||||
help
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift `expr $OPTIND - 1`
|
||||
|
|
10
logmanager
10
logmanager
|
@ -20,9 +20,9 @@ EOF
|
|||
}
|
||||
|
||||
with_n() {
|
||||
local cmd=$1
|
||||
__cmd=$1
|
||||
shift
|
||||
"$cmd" -n "$@"
|
||||
"$__cmd" -n "$@"
|
||||
}
|
||||
|
||||
while getopts hc:a:r:z:C:nN o
|
||||
|
@ -71,8 +71,8 @@ do
|
|||
do
|
||||
e="`basename "${exp}"`"
|
||||
exp="`dirname "${exp}"`"
|
||||
$cmd $archiver -e "$e" "$dir"
|
||||
$cmd $archiver -e "$e" -- "$dir"
|
||||
done
|
||||
$cmd $compressor "$dir"
|
||||
[ 0 = "$age" ] || $cmd $cleaner "$age" "$dir"
|
||||
$cmd $compressor -- "$dir"
|
||||
[ 0 = "$age" ] || $cmd $cleaner "$age" -- "$dir"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue