Skip to content

Commit 3cc540d

Browse files
committed
Use wget timestamping for cached java archive detection
1 parent 1f35eb9 commit 3cc540d

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

modules/java.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ function java_install_bundle() {
1010
rm -rf "$JRI_PATH_NEW"
1111
fi
1212

13-
if [ ! -f "$JRI_ZIP" ]; then
14-
echo "Downloading new Java..."
15-
wget "$JRI_URL" -O "$JRI_ZIP"
16-
else
17-
echo "Java archive found, using cached."
18-
fi
13+
pushd "$(dirname $JRI_ZIP)" >/dev/null
14+
echo "Downloading Java..."
15+
wget -N "$JRI_URL"
16+
popd >/dev/null
1917

2018
# extract it, rename it and point the symlink to it
2119
echo "Java package acquired, installing..."

0 commit comments

Comments
 (0)