summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-10-19 14:47:06 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-10-19 14:47:06 +0200
commitb5c882b3e2805d5e7d0f43d97685d347aad8b9cb (patch)
tree30c0522ebd56a39ed6c74d2e68372fd11e2965e8
parent7bd900795b79de4e051b5b4d371b5bebb35229ef (diff)
downloadbin-b5c882b3e2805d5e7d0f43d97685d347aad8b9cb.zip
bin-b5c882b3e2805d5e7d0f43d97685d347aad8b9cb.tar.gz
easy_e17.sh add parse_package_args function
-rwxr-xr-xeasy_e17.sh39
1 files changed, 22 insertions, 17 deletions
diff --git a/easy_e17.sh b/easy_e17.sh
index a194a1c..5a12cbf 100755
--- a/easy_e17.sh
+++ b/easy_e17.sh
@@ -472,6 +472,27 @@ function parse_args ()
done
}
+function parse_package_args ()
+{
+ args=""
+ for app_arg in `echo $package_args | tr -s '\,' ' '`; do
+ app=`echo $app_arg | cut -d':' -f1`
+ if [ "$app" == "$name" ]; then
+ args="$args `echo $app_arg | cut -d':' -f2- | tr -s '+' ' '`"
+ fi
+ done
+ for arg in $args; do
+ case $arg in
+ clean)
+ package_clean=$(($package_clean + 1))
+ ;;
+ make_only)
+ package_make_only=1
+ ;;
+ esac
+ done
+}
+
function build_package_list ()
{
effective_packages=""
@@ -971,25 +992,9 @@ function compile ()
rm -f "$logs_path/$name.log"
run_command "$name" "$path" "path" "path : " "$mode" "pwd"
# get package arguments
- args=""
package_clean=$clean
package_make_only=$make_only
- for app_arg in `echo $package_args | tr -s '\,' ' '`; do
- app=`echo $app_arg | cut -d':' -f1`
- if [ "$app" == "$name" ]; then
- args="$args `echo $app_arg | cut -d':' -f2- | tr -s '+' ' '`"
- for arg in $args; do
- case $arg in
- clean)
- package_clean=$(($package_clean + 1))
- ;;
- make_only)
- package_make_only=1
- ;;
- esac
- done
- fi
- done
+ parse_package_args
if [ $package_clean -ge 1 ]; then
if [ -e "Makefile" ]; then
if [ $package_clean -eq 1 ]; then