From 4e0ef8b415cea9088d8ea56da153abf26d1291c9 Mon Sep 17 00:00:00 2001 From: Karanbir Singh Date: Jul 02 2011 23:51:03 +0000 Subject: add a release tag option to the command line --- diff --git a/build_c6_live.sh b/build_c6_live.sh index 3cd877b..51c82e7 100755 --- a/build_c6_live.sh +++ b/build_c6_live.sh @@ -15,10 +15,11 @@ cat << EOF You need to call the script like this : $0 -arguments - -a : define the arch (required, default:none, values : [i386,x86_64]) - -p : define the repo path (required, default:none) - -m : define the media type (required, default:none, values : [cd,dvd]) - -h : display this help + -a : define the arch (required, default:none, values : [i386,x86_64]) + -p : define the repo path (required, default:none) + -m : define the media type (required, default:none, values : [cd,dvd]) + -r : release to build ( eg. 6.0 ) + -h : display this help EOF @@ -33,7 +34,7 @@ fi } -while getopts “ha:p:m:” OPTION +while getopts “ha:p:m:r” OPTION do case $OPTION in h) @@ -49,6 +50,9 @@ do p) repopath=$OPTARG ;; + r) + release=$OPTARG + ;; ?) usage exit @@ -85,7 +89,7 @@ fi /bin/cp ks/centos6-live${media}-desktop.cfg /tmp/ sed -i s#REPOPATH#$repopath#g /tmp/centos6-live${media}-desktop.cfg -setarch $arch livecd-creator -c /tmp/centos6-live${media}-desktop.cfg -f "CentOS-6-${arch}-Live${media}" +setarch $arch livecd-creator -c /tmp/centos6-live${media}-desktop.cfg -f "CentOS-${release}-${arch}-Live${media}" if [ "$isSelinuxOn" = "Enforcing" ] ;then /usr/sbin/setenforce 1