genassym.sh: Fix two minor issues found by shellcheck

o Remove redunant $ in $(( )) expression.
o Quote arg passed to work so paths with spaces, etc will work.

MFC After:		2 weeks
Reviewed by:		kib
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D31335
This commit is contained in:
Warner Losh 2021-07-28 13:42:29 -06:00
parent 29e9b487c1
commit 46dd3ef033

View File

@ -57,7 +57,7 @@ do
*) usage;;
esac
done
shift $(($OPTIND - 1))
shift $((OPTIND - 1))
case $# in
1) ;;
*) usage;;
@ -65,8 +65,8 @@ esac
if [ "$use_outfile" = "yes" ]
then
work $1 3>"$outfile" >&3 3>&-
work "$1" 3>"$outfile" >&3 3>&-
else
work $1
work "$1"
fi