Changeset 454
- Timestamp:
- 10/05/2009 00:18:50 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
confman.in (modified) (1 diff)
-
confmanlib.sh.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/confman.in
r452 r454 917 917 918 918 function recipe_remove { 919 if [ -z "$1" ] ; then print_usage 1 ; fi 920 local recipe="$1" 921 conf_remove_recipe "$recipe" 919 if [ -z "$*" ] ; then print_usage 1 ; fi 920 conf_remove_recipes "$@" || exit 1 922 921 } 923 922 -
trunk/confmanlib.sh.in
r452 r454 964 964 } 965 965 966 function conf_remove_recipes { 967 local recipe 968 local oldrecipes 969 local rc=0 970 971 for recipe in "$@"; do 972 if conf_remove_recipe "$recipe"; then 973 # Keep track of the recipes that were successfully removed 974 # to avoid inadvertent commits 975 if [ -z "$oldrecipes" ]; then 976 oldrecipes="$recipe" 977 else 978 oldrecipes="$oldrecipes,$recipe" 979 fi 980 else 981 rc=1 982 fi 983 done 984 985 # $oldrecipes is in the form foo,bar,baz. This eval trick forces 986 # curly brace expansion. 987 if echo "$oldrecipes" | grep -q ','; then 988 @SVN@ commit $(eval echo $(conf_recipe_dir)/{$oldrecipes}) 989 else 990 @SVN@ commit "$(conf_recipe_dir)/$oldrecipes" 991 fi 992 993 return $rc 994 } 995 966 996 function conf_remove_recipe { 967 997 local recipe="$1" … … 971 1001 return 1 972 1002 fi 973 @SVN@ rm "${recipe_file}" 974 @SVN@ commit "${recipe_file}"1003 @SVN@ rm "${recipe_file}" || return 1 1004 return 0 975 1005 } 976 1006
Note: See TracChangeset
for help on using the changeset viewer.
