Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [ ! $# = 0 ] ; then
- while [ ! $# = 0 ] ; do
- case $1 in
- --help|-H|-h) print_help ; shift ;;
- --revision) echo $SHPP_REV ; shift ;;
- --verbose|-v) verbose_output=true ; shift ;;
- -V|--version) echo $SHPP_VER:$SHPP_REV ; shift ;;
- # #-*) echo `read_farray "$err_input_messages" 1`;;
- --*|*)
- optspec=o: # b:dp #-: # short options
- optspec_long=defined_flags:,enabled_flags:,legacy,stdout,critical-warning,tmp:,stder:,keep #,binpath:,desktop,prefix # long options
- PROCESSED_OPTSPEC=`getopt -qo $optspec --long $optspec_long \
- -n $appname -- "$@"` || error "$( read_farray "$err_input_messages" 2 )" || exit 1 # parsed optspec
- eval set -- "$PROCESSED_OPTSPEC"
- while [ ! $# -eq 1 ] ; do
- case $1 in
- --defined-flags) input_defined_flags=${2} ; shift 2 ;;
- --enabled-flags) input_enabled_flagst=${2} ; shift 2;;
- -o) target_name="$2"; shift 2 ;;
- --legacy) legacy_mode=true ; shift ;;
- --stdout) target_name="stdout" ; shift ;;
- --critical-warning) WARNING_IS_ERROR=true ; shift ;;
- --tmp) tmp_dir=${2} ; shift 2;;
- --stder) stder=${2} ; shift 2;;
- --keep) keep=true; shift ;;
- *=*) eval $1
- --) shift; break ;;
- esac
- done
- if [ -z "$target_name" ] ; then
- target_name="$1"
- fi && \
- source_file="$1" && \
- if [ ! -e "$source_file" ] ; then
- echo "$source_file not found"
- false
- shift
- fi && \
- shift && \
- main
- ;;
- esac
- done
- else
- echo "No input given enter $appname -h for help"
- false
- fi
- exit $?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement