@@ -69,8 +69,10 @@ trap 'echo "$program($LINENO): Command failed with error code $? ([$$] $0 $*)";
6969# Option parsing
7070
7171# Options
72- shortopts=hvV
73- longopts=help,verbose,version
72+ shortopts=DhvV
73+ longopts=no-download,help,verbose,version
74+
75+ DOWNLOAD=1
7476
7577if [ " $( uname) " = " Linux" ]; then
7678 args=$( getopt -o " $shortopts " --long " $longopts " -n ' $program' -- $SV " $@ " )
8789
8890while true ; do
8991 case " $1 " in
92+ -D| --no-download) DOWNLOAD=" " ;; # Don't download, use existing file
9093 -h| --help) usage; exit ;; # Show this help, then exit
9194 -v| --verbose) VERBOSE=1;; # Be more talkative
9295 -V| --version) version; exit ;; # Show program version, then exit
@@ -119,9 +122,10 @@ DATADIR=$parent/data
119122# mysql -u root ietf_utf8 <<< "GRANT ALL PRIVILEGES ON ietf_utf8.* TO django@localhost IDENTIFIED BY 'RkTkDPFnKpko'; FLUSH PRIVILEGES;"
120123# fi
121124
122- echo " Fetching database dump ..."
123- wget -S -N -P $DATADIR http://www.ietf.org/lib/dt/sprint/ietf_utf8.sql.gz || die " No new data, quitting."
124- # rsync -u --progress zin.tools.ietf.org::tools/tools/ietf_utf8.sql.gz $DATADIR/ || die "No new data, quitting."
125+ if [ " $DOWNLOAD " ]; then
126+ echo " Fetching database dump ..."
127+ wget -S -N -P $DATADIR http://www.ietf.org/lib/dt/sprint/ietf_utf8.sql.gz || die " No new data, quitting."
128+ fi
125129
126130echo " Loading database ..."
127131gunzip < $DATADIR /ietf_utf8.sql.gz \
0 commit comments