Use subfolders for each implementation.
This commit is contained in:
parent
4738b1260c
commit
247778b867
|
@ -20,8 +20,9 @@
|
|||
## used instead. Short version is not available in this
|
||||
## format.
|
||||
|
||||
source easyoptions || exit # Ruby implementation
|
||||
# source easyoptions.sh || exit # Bash implementation, slower
|
||||
script_dir=$(dirname "$BASH_SOURCE")
|
||||
source "${script_dir}/../easyoptions" || exit # Ruby implementation
|
||||
# source "${script_dir}/easyoptions.sh" || exit # Bash implementation, slower
|
||||
|
||||
# Boolean and parameter options
|
||||
[[ -n "$some_option" ]] && echo "Option specified: --some-option"
|
|
@ -24,4 +24,4 @@
|
|||
##
|
||||
|
||||
script_dir=$(dirname "$BASH_SOURCE")
|
||||
eval "$(PATH="$PATH:/usr/lib/ruby/vendor_ruby:${script_dir}" from="$0" easyoptions.rb "$@" || echo exit 1)"
|
||||
eval "$(PATH="$PATH:/usr/lib/ruby/vendor_ruby:${script_dir}/ruby" from="$0" easyoptions.rb "$@" || echo exit 1)"
|
||||
|
|
|
@ -6,8 +6,8 @@ mkdir -p "$where" || exit
|
|||
|
||||
if [[ "$2" != --remove ]]; then
|
||||
cp -v "$from/easyoptions" "$where"
|
||||
cp -v "$from/easyoptions.sh" "$where"
|
||||
cp -v "$from/easyoptions.rb" "$where"
|
||||
cp -v "$from/bash/easyoptions.sh" "$where"
|
||||
cp -v "$from/ruby/easyoptions.rb" "$where"
|
||||
else
|
||||
rm -vf "$where/easyoptions"
|
||||
rm -vf "$where/easyoptions.sh"
|
||||
|
|
Loading…
Reference in New Issue