mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-13 23:43:47 -05:00
improve adding arguments to ARGS array
This commit is contained in:
@@ -207,7 +207,12 @@ _parseOptions_() {
|
|||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
ARGS+=("$@") # Store the remaining user input as arguments.
|
|
||||||
|
if [[ -z ${*} || ${*} == null ]]; then
|
||||||
|
ARGS=()
|
||||||
|
else
|
||||||
|
ARGS+=("$@") # Store the remaining user input as arguments.
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_usage_() {
|
_usage_() {
|
||||||
|
|||||||
@@ -516,7 +516,12 @@ _parseOptions_() {
|
|||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
ARGS+=("$@") # Store the remaining user input as arguments.
|
|
||||||
|
if [[ -z ${*} || ${*} == null ]]; then
|
||||||
|
ARGS=()
|
||||||
|
else
|
||||||
|
ARGS+=("$@") # Store the remaining user input as arguments.
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_usage_() {
|
_usage_() {
|
||||||
|
|||||||
Reference in New Issue
Block a user