Merged patch that adds --noupdate flag

git-svn-id: https://apt-cyg.googlecode.com/svn/trunk@12 f2a461e8-04e4-11de-bcc6-d9108be23e13
This commit is contained in:
sjungels 2009-08-10 14:16:43 +00:00
parent cbff7c94a1
commit e8891b5794
1 changed files with 10 additions and 3 deletions

13
apt-cyg
View File

@ -44,6 +44,7 @@ function usage()
echo " --mirror, -m <url> : set mirror" echo " --mirror, -m <url> : set mirror"
echo " --cache, -c <dir> : set cache" echo " --cache, -c <dir> : set cache"
echo " --file, -f <file> : read package names from file" echo " --file, -f <file> : read package names from file"
echo " --noupdate, -u : don't update setup.ini from mirror"
echo " --help" echo " --help"
echo " --version" echo " --version"
} }
@ -52,10 +53,10 @@ function usage()
function version() function version()
{ {
echo "apt-cyg version 0.56" echo "apt-cyg version 0.57"
echo "Written by Stephen Jungels" echo "Written by Stephen Jungels"
echo "" echo ""
echo "Copyright (c) 2005, 2006 Stephen Jungels. Released under the GPL." echo "Copyright (c) 2005-9 Stephen Jungels. Released under the GPL."
} }
@ -89,7 +90,7 @@ function findworkspace()
function getsetup() function getsetup()
{ {
if test "$noscripts" == "0" if test "$noscripts" == "0" -a "$noupdate" == "0"
then then
touch setup.ini touch setup.ini
mv setup.ini setup.ini-save mv setup.ini setup.ini-save
@ -126,6 +127,7 @@ function checkpackages()
# process options # process options
noscripts=0 noscripts=0
noupdate=0
file="" file=""
dofile=0 dofile=0
command="" command=""
@ -151,6 +153,11 @@ do
shift shift
;; ;;
--noupdate|-u)
noupdate=1
shift
;;
--help) --help)
usage usage
exit 0 exit 0