New Bash front end to the Ruby implementation.

The pure Bash implementation is now installed as easyoptions.sh instead of just easyoptions, which is now a front end to the Ruby implementation.
This commit is contained in:
Renato Silva 2014-09-11 16:45:28 -03:00
parent d4448390c3
commit 4aca0ae67a
2 changed files with 29 additions and 1 deletions

26
easyoptions Normal file
View File

@ -0,0 +1,26 @@
#!/bin/bash
##
## EasyOptions Bash Front End 2014.9.11
## Copyright (c) 2014 Renato Silva
## GNU GPLv2 licensed
##
## This is the Bash front end for EasyOptions. It is just a wrapper to the
## default implementation for Bash scripts, which is currently Ruby. The pure
## Bash implementation is available as easyoptions.sh. This wrapper makes usage
## cleaner and implementation-agnostic:
##
## source easyoptions || exit
##
## Ruby is currently also the reference implementation, meaning this is the main
## focus of development. However the idea is that new features are applied to
## all implementations. For knowing how up-to-date with the reference an
## implementation is, please refer to the commit log for the source code
## repository. For help about using EasyOptions, please refer to the
## corresponding implementation:
##
## easyoptions.sh --help
## easyoptions.rb --help
##
eval "$(from="$0" easyoptions.rb "$@" || echo exit 1)"

View File

@ -3,9 +3,11 @@
from=$(dirname "$0")
if [[ "$1" != --remove ]]; then
cp -v "$from/easyoptions.sh" /usr/local/bin/easyoptions
cp -v "$from/easyoptions" /usr/local/bin
cp -v "$from/easyoptions.sh" /usr/local/bin
cp -v "$from/easyoptions.rb" /usr/local/bin
else
rm -vf /usr/local/bin/easyoptions
rm -vf /usr/local/bin/easyoptions.sh
rm -vf /usr/local/bin/easyoptions.rb
fi