… | |
… | |
167 | you can configure a download cache directory via DLCACHE |
167 | you can configure a download cache directory via DLCACHE |
168 | in your .staticperlrc to avoid repeated downloads. |
168 | in your .staticperlrc to avoid repeated downloads. |
169 | EOF |
169 | EOF |
170 | |
170 | |
171 | rm -f $PERLTAR~ # just to be on the safe side |
171 | rm -f $PERLTAR~ # just to be on the safe side |
172 | { [ "$DLCACHE" ] && cp -l "$DLCACHE"/$PERLTAR $PERLTAR~; } \ |
172 | { [ "$DLCACHE" ] && cp "$DLCACHE"/$PERLTAR $PERLTAR~; } \ |
173 | || wget -O $PERLTAR~ "$URL" \ |
173 | || wget -O $PERLTAR~ "$URL" \ |
174 | || curl -f >$PERLTAR~ "$URL" \ |
174 | || curl -f >$PERLTAR~ "$URL" \ |
175 | || fatal "$URL: unable to download" |
175 | || fatal "$URL: unable to download" |
176 | rm -f $PERLTAR |
176 | rm -f $PERLTAR |
177 | mv $PERLTAR~ $PERLTAR |
177 | mv $PERLTAR~ $PERLTAR |
178 | if [ "$DLCACHE" ]; then |
178 | if [ "$DLCACHE" ]; then |
179 | mkdir -p "$DLCACHE" |
179 | mkdir -p "$DLCACHE" |
180 | cp -l $PERLTAR "$DLCACHE"/$PERLTAR~ && \ |
180 | cp $PERLTAR "$DLCACHE"/$PERLTAR~ && \ |
181 | mv "$DLCACHE"/$PERLTAR~ "$DLCACHE"/$PERLTAR |
181 | mv "$DLCACHE"/$PERLTAR~ "$DLCACHE"/$PERLTAR |
182 | fi |
182 | fi |
183 | fi |
183 | fi |
184 | |
184 | |
185 | verblock <<EOF |
185 | verblock <<EOF |