removed [[ TEST ]] && action form for if [[ TEST ]]; then action; fi for compatibility
This commit is contained in:
@@ -23,9 +23,10 @@ export -f stdtime
|
||||
# (or any old files if runned several time on same file)
|
||||
backupdist()
|
||||
{
|
||||
[[ $# -lt 1 ]] &&
|
||||
prnt E "backupdist(): At least one argument is required." &&
|
||||
if [[ $# -lt 1 ]]; then
|
||||
prnt E "backupdist(): At least one argument is required."
|
||||
exit 11
|
||||
fi
|
||||
|
||||
for file in $@; do
|
||||
if [[ -f ${file} ]]; then
|
||||
@@ -53,14 +54,14 @@ installfile()
|
||||
local filelist=""
|
||||
local i=0
|
||||
|
||||
[[ $# -lt 2 ]] && (
|
||||
if [[ $# -lt 2 ]]; then
|
||||
prnt E "installfile(): At least two arguments are required."
|
||||
die 11
|
||||
)
|
||||
[[ $(echo $@ | grep "\*\|\?") ]] && (
|
||||
fi
|
||||
if [[ $(echo $@ | grep "\*\|\?") ]]; then
|
||||
prnt E "installfile(): Wildcards are not authorized."
|
||||
die 7
|
||||
)
|
||||
fi
|
||||
|
||||
for arg in $@; do
|
||||
if [[ -f $MYPATH/repo/hosts/$HOSTNAME/$arg ]]; then
|
||||
|
||||
Reference in New Issue
Block a user