Changeset 23077 for other-projects/cascade-make/trunk
- Timestamp:
- 2010-10-11T10:34:38+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/cascade-make/trunk/lib/cascade-lib.bash
r22249 r23077 88 88 } 89 89 90 toplevel_make_dist() 91 { 92 local currentdir=$1 93 94 local dirname=`basename $currentdir` 95 96 local checklist="setup.bash setup.bat perllib $GSDLOS lib" 97 local distlist="" 98 99 for d in $checklist ; do 100 if [ -e $d ] ; then 101 distlist="$distlist $dirname/$d" 102 fi 103 done 104 105 pushd .. 106 107 tar cvzf $dirname-$GSDLOS.tar.gz $distlist 108 mv $dirname-$GSDLOS.tar.gz $dirname/. 109 110 popd 111 } 112 113 opt_make_dist() 114 { 115 local type=$1 116 117 if [ $type = "1" ] ; then 118 119 if [ -f MAKE-DIST.sh ] ; then 120 ./MAKE-DIST.sh 121 else 122 toplevel_make_dist `pwd` 123 fi 124 fi 125 } 126 90 127 opt_run_untar() 91 128 { … … 164 201 165 202 203 run_installclean() 204 { 205 local fulldir="`pwd`/$GSDLOS" 206 read -p "Delete $fulldir [y/n]?" ans 207 if [ $ans = "y" ] ; then 208 /bin/rm -rf "$fulldir" 209 fi 210 211 exit 0 212 } 213 214 215 print_usage() 216 { 217 echo "$0 [untar|configure|comiple|install|clean|distclean|tarclean|makedist]+" 218 echo " or" 219 echo "$0 [installclean|help]" 220 exit 0 221 } 222 166 223 force_untar=0 167 224 auto_untar=0 … … 175 232 distclean=0 176 233 tarclean=0 234 makedist=0 177 235 178 236 if [ $# -gt 0 ] ; then 179 237 for cmd in $* ; do 180 238 echo $cmd 181 if [ $cmd = "untar" ] ; then force_untar=1 182 elif [ $cmd = "configure" ] ; then force_config=1 183 elif [ $cmd = "compile" ] ; then compile=1 184 elif [ $cmd = "install" ] ; then install=1 185 elif [ $cmd = "clean" ] ; then clean=1 186 elif [ $cmd = "distclean" ] ; then distclean=1 187 elif [ $cmd = "tarclean" ] ; then tarclean=1 239 if [ $cmd = "untar" ] ; then force_untar=1 240 elif [ $cmd = "configure" ] ; then force_config=1 241 elif [ $cmd = "compile" ] ; then compile=1 242 elif [ $cmd = "install" ] ; then install=1 243 elif [ $cmd = "clean" ] ; then clean=1 244 elif [ $cmd = "distclean" ] ; then distclean=1 245 elif [ $cmd = "tarclean" ] ; then tarclean=1 246 elif [ $cmd = "makedist" ] ; then makedist=1 247 248 elif [ $cmd = "installclean" ] ; then run_installclean 249 elif [ $cmd = "help" ] ; then print_usage 188 250 fi 189 251 done … … 197 259 distclean=0 198 260 tarclean=0 261 makedist=0 199 262 fi 200 263 … … 205 268 206 269 fi 207
Note:
See TracChangeset
for help on using the changeset viewer.