fix: you cannot modify modify.sh script name

This commit is contained in:
PolishPigeon 2022-04-08 13:03:14 +02:00
parent 4fded48e8d
commit 6c2529b264
13 changed files with 18 additions and 0 deletions

0
EOPSY/A Normal file
View File

View File

0
EOPSY/RECURSEFILE Normal file
View File

View File

0
EOPSY/b Normal file
View File

View File

@ -4,6 +4,8 @@
# the name of the script without a path
name=`basename $0`
help()
{
echo "-l <dir/file names...> -> lowerize file/folder name"
@ -19,6 +21,12 @@ help()
uppercase()
{
if test "$1" = $name
then
error_msg "you cannot modify name of this script!"
exit 3
fi
if test -z "$1"
then
@ -42,6 +50,11 @@ uppercase()
lowercase()
{
if test "$1" = $name
then
error_msg "you cannot modify name of this script!"
exit 3
fi
if test -z "$1"
then
error_msg "missing filename for -l"
@ -60,6 +73,11 @@ lowercase()
sneed()
{
if test "$2" = $name
then
error_msg "you cannot modify name of this script!"
exit 3
fi
if test -z "$1"
then
error_msg "missing sed pattern"

0
EOPSY/recurselowerfile Normal file
View File

0
EOPSY/sed Normal file
View File

0
EOPSY/sedrecursefile Normal file
View File