diff options
Diffstat (limited to '.tools')
-rwxr-xr-x | .tools/downloadlib.sh | 22 | ||||
-rwxr-xr-x | .tools/imagemagiccheck.sh | 24 | ||||
-rwxr-xr-x | .tools/init.sh | 91 | ||||
-rwxr-xr-x | .tools/licensecheck.sh | 24 | ||||
-rwxr-xr-x | .tools/newlines.sh | 28 | ||||
-rwxr-xr-x | .tools/pngcheck.sh | 23 | ||||
-rwxr-xr-x | .tools/retry.sh | 15 |
7 files changed, 0 insertions, 227 deletions
diff --git a/.tools/downloadlib.sh b/.tools/downloadlib.sh deleted file mode 100755 index b9a50d73..00000000 --- a/.tools/downloadlib.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -export zipname="lib.zip" -export libname="$1_$2" - -mkdir libdownload -cd libdownload -rm "${zipname}" -../client-data/.tools/retry.sh wget -O "${zipname}" "https://gitlab.com/simplepackagemanager/spm/builds/artifacts/$1/download?job=${libname}" -unzip "${zipname}" -cp -r "bin/${libname}" .. -cd .. - -rm -rf /usr/local/spm/bin/${libname} -mkdir -p /usr/local/spm/bin - -cp -r libdownload/bin/${libname} /usr/local/spm/bin/ -ls /usr/local/spm/bin/${libname} -if [ "$?" != 0 ]; then - echo "Library $1 $2 unpack failed" - exit 1 -fi diff --git a/.tools/imagemagiccheck.sh b/.tools/imagemagiccheck.sh deleted file mode 100755 index fdb8d61b..00000000 --- a/.tools/imagemagiccheck.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -source ./.tools/init.sh - -clientdata_init - -aptget_update -aptget_install git-core gcc ca-certificates imagemagick -rm -rf tools -gitclone https://gitlab.com/TMW2 evol-tools.git tools - -cd tools/imagescheck - -./icccheck.sh >icccheck.log -check_error $? - -export RES=$(cat icccheck.log) -if [[ -n "${RES}" ]]; then - echo "Detected icc profiles" - cat icccheck.log - exit 1 -fi - -echo "Seems fine!" diff --git a/.tools/init.sh b/.tools/init.sh deleted file mode 100755 index 11a5c402..00000000 --- a/.tools/init.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -function check_error { - if [ "$1" != 0 ]; then - echo "Error $1" - exit $1 - fi -} - -function gitclone1 { - echo git clone $2 $3 - git clone $2 $3 - if [ "$?" != 0 ]; then - echo git clone $1 $3 - git clone $1 $3 - return $? - fi - return $? -} - -function gitclone { - export name1=$1/$2 - export name2=${CI_BUILD_REPO##*@} - export name2=https://${name2%/*}/$2 - - gitclone1 "$name1" "$name2" $3 - if [ "$?" != 0 ]; then - sleep 1s - gitclone1 "$name1" "$name2" $3 - if [ "$?" != 0 ]; then - sleep 3s - gitclone1 "$name1" "$name2" $3 - if [ "$?" != 0 ]; then - sleep 5s - gitclone1 "$name1" "$name2" $3 - fi - fi - fi - check_error $? -} - -function update_repos { - if [ "$CI_SERVER" == "" ]; - then - return - fi - - export DATA=$(cat /etc/resolv.conf|grep "nameserver 1.10.100.101") - if [ "$DATA" != "" ]; - then - echo "Detected local runner" - sed -i 's!http://httpredir.debian.org/debian!http://1.10.100.103/debian!' /etc/apt/sources.list - else - echo "Detected non local runner" - fi -} - -function aptget_update { - update_repos - apt-get update - if [ "$?" != 0 ]; then - sleep 1s - apt-get update - if [ "$?" != 0 ]; then - sleep 1s - apt-get update - fi - fi - check_error $? -} - -function aptget_install { - apt-get -y -qq install $* - if [ "$?" != 0 ]; then - sleep 1s - apt-get -y -qq install $* - if [ "$?" != 0 ]; then - sleep 2s - apt-get -y -qq install $* - fi - fi - check_error $? -} - -function clientdata_init { - mkdir shared - pwd ; ls -a ; ls -al .. - cd .. - ln -s art client-data - check_error $? -} diff --git a/.tools/licensecheck.sh b/.tools/licensecheck.sh deleted file mode 100755 index a332adf3..00000000 --- a/.tools/licensecheck.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -source ./.tools/init.sh - -clientdata_init -cd ../client-data ; pwd -aptget_update -aptget_install git-core gcc ca-certificates grep -rm -rf tools -gitclone https://gitlab.com/TMW2 evol-tools.git tools - -cd tools/licensecheck - -./clientdata.sh >license.log -check_error $? - -export RES=$(cat license.log) -if [[ -n "${RES}" ]]; then - echo "Detected missing licenses." - cat license.log - echo "Estimated total missing licenses:" - wc -l license.log - exit 1 -fi diff --git a/.tools/newlines.sh b/.tools/newlines.sh deleted file mode 100755 index 1c06625c..00000000 --- a/.tools/newlines.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -source ./.tools/init.sh - -aptget_update -aptget_install dos2unix git-core - -export LOG1="newlines.log" -SIGNAL=0; - -rm ${LOG1} - -find -H . -type f -name "*.xml" -exec dos2unix {} \; >${LOG1} -find -H . -type f -name "*.tmx" -exec dos2unix {} \; >>${LOG1} -find -H . -type f -name "*.md" -exec dos2unix {} \; >>${LOG1} -find -H . -type f -name "*.conf" -exec dos2unix {} \; >>${LOG1} - -export RES=$(git diff --name-only) -if [[ -n "${RES}" ]]; then - printf "\n\n-----------------------------------------------------\n\n"; - echo "Wrong new lines detected in several files files:" - printf "\n\n"; - git diff --name-only - SIGNAL=1; -fi - -exit $SIGNAL; - diff --git a/.tools/pngcheck.sh b/.tools/pngcheck.sh deleted file mode 100755 index 8955b26e..00000000 --- a/.tools/pngcheck.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -source ./.tools/init.sh - -aptget_update -aptget_install pngcheck - -export LOG1="pngcheck.log" -export LOG2="pngcheck2.log" - -rm ${LOG1} -rm ${LOG2} - -find -H . -type f -name "*.png" -exec pngcheck {} \; >${LOG1} - -grep -v "32-bit RGB+alpha, non-interlaced, " ${LOG1} >${LOG2} -export DATA=$(cat pngcheck2.log) -if [[ -n "${DATA}" ]]; then - echo "Images must be in 32 bit RGBA and non-interlanced" - echo "Wrong images format found:" - cat ${LOG2} - exit 1 -fi diff --git a/.tools/retry.sh b/.tools/retry.sh deleted file mode 100755 index aaa50e98..00000000 --- a/.tools/retry.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -n=0 - -while true; do - $* - if [ "$?" == 0 ]; then - exit 0 - fi - if [[ $n -ge 10 ]]; then - exit -1 - fi - sleep 5s - n=$((n+1)) -done |