| 1 |
# This script shouldn't be run directly, but instead invoked by make_appimage.py |
| 2 |
# which runs this script in a Centos 6.8 docker container to create an app image |
| 3 |
|
| 4 |
# Arguments |
| 5 |
# $1 clazy sha1 to build |
| 6 |
# $2 user uid to chown the files to before leaving docker |
| 7 |
|
| 8 |
mkdir /tmp/clazy_work/ |
| 9 |
cp -r /clazy.AppDir/ /tmp/clazy_work/ |
| 10 |
|
| 11 |
|
| 12 |
cd /clazy |
| 13 |
echo "Clazy sha1: `git rev-parse HEAD`" >> /tmp/clazy_work/clazy.AppDir/sha1 |
| 14 |
|
| 15 |
git clean -fdx . |
| 16 |
git checkout . |
| 17 |
|
| 18 |
echo "Running git pull..." |
| 19 |
git pull |
| 20 |
|
| 21 |
echo "Checking out $1..." |
| 22 |
git checkout $1 |
| 23 |
|
| 24 |
echo "Building..." |
| 25 |
cmake -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE_HACK=ON -DLINK_CLAZY_TO_LLVM=OFF -DCMAKE_INSTALL_PREFIX=/tmp/clazy_work/clazy.AppDir/usr . && make -j12 && make install |
| 26 |
|
| 27 |
echo "Fixing permissions..." |
| 28 |
chown -R $2 /tmp/clazy_work/clazy.AppDir/ |
| 29 |
|
| 30 |
cp /clazy/README.md /tmp/clazy_work/clazy.AppDir/ |
| 31 |
cp /clazy/LICENSES/LGPL-2.0-or-later.txt /tmp/clazy_work/clazy.AppDir/ |
| 32 |
|
| 33 |
|
| 34 |
echo "Done" |
| 35 |
echo |