mirror of
https://github.com/vbatts/bvi.git
synced 2025-08-02 07:30:28 +00:00
bvi-1.3.1.src.tar.gz
This commit is contained in:
parent
0220b756fa
commit
16baacb54f
46 changed files with 5276 additions and 1914 deletions
|
@ -4,9 +4,29 @@
|
|||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.12.2.1 1998/12/26 17:32:14 bje Exp $
|
||||
# $Id: mkinstalldirs,v 1.1 2001/05/22 14:43:50 akim Exp $
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
|
@ -28,6 +48,17 @@ do
|
|||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
|
||||
lasterr=""
|
||||
chmod $dirmode "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -36,3 +67,8 @@ do
|
|||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode:shell-script
|
||||
# sh-indentation:3
|
||||
# End:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue