Compare commits

...

4 Commits

Author SHA1 Message Date
a773d1a668 license update...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-01-09 11:44:41 +03:00
33ebc6e5aa Merge branch 'master' of github.com:flynx/git-utils 2024-01-09 11:42:55 +03:00
b1688c36b6 notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-01-09 11:42:13 +03:00
5097df0717 added git-chmod
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-01-09 03:32:05 +03:00
3 changed files with 46 additions and 6 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2023, Alex A. Naanou Copyright (c) 2023-2024, Alex A. Naanou
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

45
bin/git-chmod Normal file
View File

@ -0,0 +1,45 @@
#!/usr/bin/bash
while true ; do
case $1 in
-h|--help)
echo "Usage: $(basename "$0") MODE FILE ..."
echo
echo "Change file mode on file(s)."
echo
echo "Options:"
echo " -h --help - print this message and exit"
echo
echo "This is equivalent to:"
echo " $ git update-index --chmod=MODE FILE ..."
echo
echo "This is useful in default configurations of git on Windows."
echo
exit
;;
-*|--*)
echo "Error: unknown option: \"$1\"" >&2
exit
;;
*)
break
;;
esac
done
if [[ $# < 2 ]] ; then
echo "Error need at least two arguments."
exit 1
fi
MODE=$1
shift
git update-index --chmod="$MODE" "$@"
# vim:set sw=4 ts=4 :

View File

@ -76,8 +76,3 @@ done
# vim:set sw=4 ts=4 : # vim:set sw=4 ts=4 :