Browse Source

vbuilder.sh.inを更新: actionsから先頭の -- がなくても動くようにしました。例えば、build-rpm = --build-rpm

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@679 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 15 years ago
parent
commit
12327551ee
3 changed files with 19 additions and 13 deletions
  1. 6 1
      vbootstrap-vl.spec
  2. 4 3
      vbuilder-bash-completion.sh
  3. 9 9
      vbuilder.sh.in

+ 6 - 1
vbootstrap-vl.spec

@@ -1,7 +1,7 @@
 # This package is maintained on trac svn repository. Please do not change on local.
 # If you find a BUG, please report to Vine@vinelinux.org or mailing list or BTS.
 
-%define version 0.0.20
+%define version 0.0.21
 
 Summary: bootstrap scripts to create a basic Vine Linux system
 Summary(ja): Vine Linux の基本システムを作成するためのスクリプト
@@ -61,6 +61,11 @@ vbootstrap は Vine Linux の基本システムを既存の Vine Linux システ
 
 
 %changelog
+* Fri Mar 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.21-1
+- added a compatible name for actions: 
+  dropped two hyphens "--" from the head of an action "--hoge"
+  (e.g. build-rpm = --build-rpm)
+
 * Sun Mar 21 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.20-1
 - fixed RPM_Build()
 

+ 4 - 3
vbuilder-bash-completion.sh

@@ -23,7 +23,8 @@ _vbuilder()
 
     ## The basic options we'll complete.
     options="--version --arch --dist-upgrade --unionfs --target --with-compat32"
-    actions="--clean --build --build-rpm --install-rpm --remove-rpm"
+    actions="--clean --build --build-rpm --install-rpm --remove-rpm \
+             clean build build-rpm install-rpm remove-rpm"
     opts="$options $actions"
 
     _arch=$(rpm --eval %_arch)
@@ -51,13 +52,13 @@ _vbuilder()
 	    COMPREPLY=( $(compgen -W "${running}" -- "${cur}") )
 	    ;;
 
-	--build-rpm)
+	--build-rpm|build-rpm)
 	    if [ $COMP_CWORD -eq 1 -o "${COMPREPLY+set}" != "set" ]; then
 		_filedir 'src.rpm'
 	    fi
 	    ;;
 
-	--install-rpm|--remove-rpm)
+	--install-rpm|install-rpm|--remove-rpm|remove-rpm)
 	    if [ $COMP_CWORD -eq 1 -o "${COMPREPLY+set}" != "set" ]; then
 		_filedir 'rpm'
 	    fi

+ 9 - 9
vbuilder.sh.in

@@ -141,11 +141,11 @@ check-parameter(){
 		Usage_$LOCALE
 		return 1
 		;;
-	    --version|--arch|--target|--build-rpm|--install-rpm|--remove-rpm)
+	    --version|--arch|--target|--build-rpm|build-rpm|--install-rpm|install-rpm|--remove-rpm|remove-rpm)
 		shift
 		check-next-parameter $1 || return 1
 		;;
-	    --dist-upgrade|--unionfs|--with-compat32|--build|--clean)
+	    --dist-upgrade|--unionfs|--with-compat32|--build|build|--clean|clean)
 		;;
 	    *)
 		Msg_MissingParameter_$LOCALE $1
@@ -605,10 +605,10 @@ check-parameter $* || exit 1
 while [ $# -gt 0 ]; do
     tmpARG=$1
     case $tmpARG in
-	--version|--arch|--target|--build-rpm|--install-rpm|--remove-rpm)
+	--version|--arch|--target|--build-rpm|build-rpm|--install-rpm|install-rpm|--remove-rpm|remove-rpm)
 	    shift
 	    ;;
-	--dist-upgrade|--unionfs|--with-compat32|--build|--clean)
+	--dist-upgrade|--unionfs|--with-compat32|--build|build|--clean|clean)
 	    ;;
 	*)
 	    echo unknown option $1
@@ -636,22 +636,22 @@ while [ $# -gt 0 ]; do
 	--with-compat32)
 	    RPM_OPTS="${RPM_OPTS} --with compat32"
 	    ;;
-	--build-rpm)
+	--build-rpm|build-rpm)
 	    RPM_PKG=$1
 	    RPM_Build || exit 1
 	    ;;
-	--install-rpm)
+	--install-rpm|install-rpm)
 	    RPM_PKG=$1
 	    RPM_Install || exit 1
 	    ;;
-	--remove-rpm)
+	--remove-rpm|remove-rpm)
 	    RPM_PKG=$1
 	    RPM_Remove || exit 1
 	    ;;
-	--build)
+	--build|build)
 	    Build
 	    ;;
-	--clean)
+	--clean|clean)
 	    Clean
 	    ;;
     esac