Преглед изворни кода

vbuilder.sh.in: fixed around --target option

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@407 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi пре 15 година
родитељ
комит
c53ae0e61b
2 измењених фајлова са 10 додато и 5 уклоњено
  1. 4 1
      vbootstrap.spec
  2. 6 4
      vbuilder.sh.in

+ 4 - 1
vbootstrap.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.8
+%define version 0.0.9
 
 Summary: bootstrap scripts to create a basic Vine Linux system
 Summary(ja): Vine Linux の基本システムを作成するためのスクリプト
@@ -59,6 +59,9 @@ make DESTDIR=$RPM_BUILD_ROOT install
 
 
 %changelog
+* Sat Dec 26 2009 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.9-1
+- fixed vbuilder.sh.in around --target option
+
 * Sat Dec 26 2009 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.8-1
 - updated vbuilder.sh.in
   - added --target option which gives a build target of source rpm

+ 6 - 4
vbuilder.sh.in

@@ -153,10 +153,12 @@ setup-vbootstrap(){
 	fi
 
 	## check build target option ${TARGET}
-	RPM_TARGET_LIST="$(cat /usr/lib/rpm/rpmrc | grep arch_canon: | sed -e "s/arch_canon:[[:blank:]]*\(.*\):.*/\1/")"
-	if [ -z "$(echo $RPM_TARGET_LIST | grep $TARGET)" ]; then
-	    Msg_NoSupportTARGET_$LOCALE
-	    exit 1
+	if [ ! -z "${TARGET}" ]; then
+	    RPM_TARGET_LIST="$(cat /usr/lib/rpm/rpmrc | grep arch_canon: | sed -e "s/arch_canon:[[:blank:]]*\(.*\):.*/\1/")"
+	    if [ -z "$(echo $RPM_TARGET_LIST | grep $TARGET)" ]; then
+		Msg_NoSupportTARGET_$LOCALE
+		exit 1
+	    fi
 	fi
 
     fi