File indexing completed on 2024-05-05 05:41:21

0001 # This script shouldn't be run directly, but instead invoked by make_appimage.py
0002 # which runs this script in a Centos 6.8 docker container to create an app image
0003 
0004 # Arguments
0005 #   $1 clazy sha1 to build
0006 #   $2 user uid to chown the files to before leaving docker
0007 
0008 mkdir /tmp/clazy_work/
0009 cp -r /clazy.AppDir/ /tmp/clazy_work/
0010 
0011 
0012 cd /clazy
0013 echo "Clazy sha1: `git rev-parse HEAD`" >> /tmp/clazy_work/clazy.AppDir/sha1
0014 
0015 git clean -fdx .
0016 git checkout .
0017 
0018 echo "Running git pull..."
0019 git pull
0020 
0021 echo "Checking out $1..."
0022 git checkout $1
0023 
0024 echo "Building..."
0025 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
0026 
0027 echo "Fixing permissions..."
0028 chown -R $2 /tmp/clazy_work/clazy.AppDir/
0029 
0030 cp /clazy/README.md /tmp/clazy_work/clazy.AppDir/
0031 cp /clazy/LICENSES/LGPL-2.0-or-later.txt /tmp/clazy_work/clazy.AppDir/
0032 
0033 
0034 echo "Done"
0035 echo