added small commands, lowercasing env names
All checks were successful
/ Lint Check Shellscripts (push) Successful in 13s

This commit is contained in:
Phani Pavan K
2026-01-13 20:47:10 +05:30
parent eb96776e3c
commit 928e8b2d2d
2 changed files with 5 additions and 5 deletions

4
jconf
View File

@@ -47,7 +47,7 @@ fi
cmd=$1
case "$cmd" in
adduser)
adduser|mku)
USER=$(echo "$2" | tr "[:upper:]" "[:lower:]")
exist=$(awk -F: -v username="$USER" '{if ($1 == username && $3 >= 1000 && $1 != "nobody") {print 1; found=1; exit}} END {if (!found) print 0}' /etc/passwd)
if [ "$exist" -eq 1 ]; then
@@ -71,7 +71,7 @@ case "$cmd" in
fi
exit 1
;;
deluser)
deluser|rmu)
USER=$(echo "$2" | tr "[:upper:]" "[:lower:]")
exist=$(awk -F: -v username="$USER" '{if ($1 == username && $3 >= 1000 && $1 != "nobody") {print 1; found=1; exit}} END {if (!found) print 0}' /etc/passwd)
if [ "$exist" -eq 0 ]; then

6
penv Normal file → Executable file
View File

@@ -186,16 +186,16 @@ cmd=$1
case "$cmd" in
new|mk)
create "$2" "$3"
create "$(echo "$2" | tr "[:upper:]" "[:lower:]")" "$3"
;;
del|rm)
delete "$2"
delete "$(echo "$2" | tr "[:upper:]" "[:lower:]")"
;;
# setdef|sd)
# setdef $2
# ;;
act|ac)
activate "$2"
activate "$(echo "$2" | tr "[:upper:]" "[:lower:]")"
;;
list|ls)
list