"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "resources/examples/simple-wrapper.sh" between
argbash-2.9.0.tar.gz and argbash-2.10.0.tar.gz

About: argbash is a bash code generator that can assist you in writing scripts that accept arguments.

simple-wrapper.sh  (argbash-2.9.0):simple-wrapper.sh  (argbash-2.10.0)
#!/bin/bash #!/bin/bash
# DEFINE_SCRIPT_DIR() # DEFINE_SCRIPT_DIR()
# ARG_POSITIONAL_INF([directory],[Directories to go through],[1]) # ARG_POSITIONAL_INF([directory],[Directories to go through],[1])
# ARG_OPTIONAL_SINGLE([glob],[],[What files to match in the directory],[*]) # ARG_OPTIONAL_SINGLE([glob],[],[What files to match in the directory],[*])
# ARGBASH_WRAP([simple-parsing],[filename]) # ARGBASH_WRAP([simple-parsing],[filename])
# ARG_HELP([This program tells you size of specified files in given directories in units you choose.]) # ARG_HELP([This program tells you size of specified files in given directories in units you choose.])
# ARGBASH_SET_INDENT([ ]) # ARGBASH_SET_INDENT([ ])
# ARGBASH_GO() # ARGBASH_GO()
# needed because of Argbash --> m4_ignore([ # needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.9.0 one line above ### ### START OF CODE GENERATED BY Argbash v2.10.0 one line above ###
# Argbash is a bash code generator used to get arguments parsing right. # Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info # Argbash is FREE SOFTWARE, see https://argbash.io for more info
die() die()
{ {
local _ret="${2:-1}" local _ret="${2:-1}"
test "${_PRINT_HELP:-no}" = yes && print_help >&2 test "${_PRINT_HELP:-no}" = yes && print_help >&2
echo "$1" >&2 echo "$1" >&2
exit "${_ret}" exit "${_ret}"
} }
skipping to change at line 131 skipping to change at line 131
shift shift
done done
} }
parse_commandline "$@" parse_commandline "$@"
handle_passed_args_count handle_passed_args_count
assign_positional_args 1 "${_positionals[@]}" assign_positional_args 1 "${_positionals[@]}"
# OTHER STUFF GENERATED BY Argbash # OTHER STUFF GENERATED BY Argbash
_args_simple_parsing=("${_args_simple_parsing_opt[@]}" "${_args_simple_parsing_p os[@]}") _args_simple_parsing=("${_args_simple_parsing_opt[@]}" "${_args_simple_parsing_p os[@]}")
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || die "Couldn't dete rmine the script's running directory, which probably matters, bailing out" 2 script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || { echo "Couldn't d etermine the script's running directory, which probably matters, bailing out" >& 2; exit 2; }
### END OF CODE GENERATED BY Argbash (sortof) ### ]) ### END OF CODE GENERATED BY Argbash (sortof) ### ])
# [ <-- needed because of Argbash # [ <-- needed because of Argbash
script="$script_dir/simple.sh" script="$script_dir/simple.sh"
test -f "$script" || { echo "Missing the wrapped script, was expecting it next t o me, in '$script_dir'."; exit 1; } test -f "$script" || { echo "Missing the wrapped script, was expecting it next t o me, in '$script_dir'."; exit 1; }
for directory in "${_arg_directory[@]}" for directory in "${_arg_directory[@]}"
do do
test -d "$directory" || die "We expected a directory, got '$directory', bailin g out." test -d "$directory" || die "We expected a directory, got '$directory', bailin g out."
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)