mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
buildserver: unpack gradle versions with provisioning shell script
This was not using anything special from chef, so do it in a shell script instead. This makes the script easier for the python/shell people, and probably uses less memory, since chef is a memory hog. This might even make the provision go faster since it uploads the whole script as a file to the VM, then runs it there. I think chef sends each command via SSH.
This commit is contained in:
parent
02a835ff95
commit
6ea2508127
4 changed files with 23 additions and 43 deletions
20
buildserver/provision-gradle
Normal file
20
buildserver/provision-gradle
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
test -e /opt/gradle/versions || mkdir -p /opt/gradle/versions
|
||||
cd /opt/gradle/versions
|
||||
for f in /vagrant/cache/gradle-*.zip; do
|
||||
ver=`echo $f | sed 's,.*gradle-\([0-9][0-9.]*\).*\.zip,\1,'`
|
||||
if [ ! -d /opt/gradle/versions/${ver} ]; then
|
||||
unzip -qq $f
|
||||
mv gradle-${ver} /opt/gradle/versions/${ver}
|
||||
fi
|
||||
done
|
||||
|
||||
chmod -R a+rX /opt/gradle
|
||||
|
||||
test -e /opt/gradle/bin || mkdir -p /opt/gradle/bin
|
||||
touch /opt/gradle/bin/gradle
|
||||
chown vagrant.vagrant /opt/gradle/bin/gradle
|
||||
chmod 0755 /opt/gradle/bin/gradle
|
Loading…
Add table
Add a link
Reference in a new issue