-
-
Save qwertychouskie/2acf5648c086992c0e549475f6b368c4 to your computer and use it in GitHub Desktop.
Revisions
-
qwertychouskie revised this gist
Nov 1, 2018 . 3 changed files with 47 additions and 52 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,50 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ BASEDIR=/home/qwerty/stk # Dir with stk-code and stk-assets inside compiler=/usr/bin/clang # Your C compiler compilerplusplus=/usr/bin/clang++ # Your C++ compiler jobscount=4 # Count of build jobs # Hint: you can use ping for setting up distributed builds # Manually create "$BASEDIR"/stk-code/needtoupdate to force rebuild This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ #!/bin/bash assetstriger=false codetriger=false compiler=gcc compilerplusplus=g++ . /etc/stk-update startupdate(){ BUILD_DIR="$BASEDIR"/stk-code/cmake_build cd $BUILD_DIR cmake -DCMAKE_INSTALL_PREFIX=/usr -DSERVER_ONLY=ON -DCMAKE_CXX_COMPILER="$compilerplusplus" -DCMAKE_C_COMPILER="$compiler" -DCMAKE_BUILD_TYPE=RelWithDebInfo .. make -j $jobscount killall supertuxkart 2>/dev/null && sleep 5 pkexec sh -c "cd ${BUILD_DIR} && make install" rm -f "$BASEDIR"/stk-code/needtoupdate } checkupdate(){ cd "$BASEDIR"/stk-assets if [ $(svn update | wc -l) -gt 2 ] then assetstriger=true fi cd "$BASEDIR"/stk-code old_hash=$(git rev-parse HEAD) git pull if [ $old_hash != $(git rev-parse HEAD) ] # Last commit is different then codetriger=true fi if $codetriger || $assetstriger then return 0 else return 1 fi } if checkupdate || [ -e "$BASEDIR"/stk-code/needtoupdate ] then startupdate fi -
v1993 revised this gist
Oct 8, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ BASEDIR=/home/v/compile # Dir with stk-code and stk-assets inside compiler=/usr/bin/zapcc++ # Your C++ compiler jobscount=4 # Count of build jobs # Hint: you can use ping for setting up distributed builds -
v1993 created this gist
Oct 8, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,50 @@ #!/bin/bash assetstriger=false codetriger=false compiler=g++ . /etc/stk-update startupdate(){ if zenity --question --title=SuperTuxKart --text='Есть обновления SuperTuxKart. Поставить?' --icon-name=supertuxkart --ok-label=Поставить --cancel-label=Потом --modal then BUILD_DIR="$BASEDIR"/stk-code/cmake_build cd $BUILD_DIR cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_COMPILER="$compiler" .. make -j $jobscount | tee /dev/stderr | grep -o --line-buffered '\[.*\%\]' | grep --line-buffered -oE '[0-9]*' | zenity --progress --auto-kill --title="Компилятор" --text="Компиляция supertuxkart" killall supertuxkart 2>/dev/null && sleep 5 pkexec sh -c "cd ${BUILD_DIR} && make install" rm -f "$BASEDIR"/stk-code/needtoupdate else touch "$BASEDIR"/stk-code/needtoupdate echo "Aborted." 1>/dev/stderr return 0 fi } checkupdate(){ cd "$BASEDIR"/stk-assets if [ $(svn update | wc -l) -gt 2 ] then assetstriger=true fi cd "$BASEDIR"/stk-code old_hash=$(git rev-parse HEAD) git pull if [ $old_hash != $(git rev-parse HEAD) ] # Last commit is different then codetriger=true fi if $codetriger || $assetstriger then return 0 else return 1 fi } if checkupdate || [ -e "$BASEDIR"/stk-code/needtoupdate ] then startupdate fi This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ BASEDIR=/home/v/compile # Dir with stc-code and stc-assets inside compiler=/usr/bin/zapcc++ # Your C++ compiler jobscount=4 # Count of build jobs # Hint: you can use ping for setting up distributed builds # Manually create "$BASEDIR"/stk-code/needtoupdate to force rebuild