mirror of
https://github.com/kevinnlsamuel/bak-old.git
synced 2025-12-06 10:05:58 +05:30
configure bak-old to print usage when no args are passed
This commit is contained in:
10
bak-old.sh
10
bak-old.sh
@@ -188,6 +188,10 @@ ${DEBUG+debug} ###
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# SANITISING PARAMS AND OPTIONS
|
# SANITISING PARAMS AND OPTIONS
|
||||||
##################################
|
##################################
|
||||||
|
if [[ $# -eq 0 ]]; then
|
||||||
|
print_usage
|
||||||
|
fi
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
'-h' )
|
'-h' )
|
||||||
@@ -239,10 +243,10 @@ done
|
|||||||
deps=(realpath)
|
deps=(realpath)
|
||||||
|
|
||||||
for dep in $deps; do
|
for dep in $deps; do
|
||||||
if command -v "$dep"; then
|
if command -v "$dep" >/dev/null; then
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
missing=":${dep}"
|
missing=":${dep}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user