Skip to content
Snippets Groups Projects
Commit 35ee8551 authored by Murat.Khabriev's avatar Murat.Khabriev
Browse files

scripts for prob

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 129 additions and 0 deletions
ANDROID_NDK_HOME="/opt/android-ndk-r16b"
SDKROOT="/opt/android-sdk/bin"
NDKHOST="linux-x86_64"
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
ANDRQT_HOME="/usr/lib/crossdev"
HOST_DISTR_VERSIONS="stretch"
HOST_ARCH_VERSIONS="amd64"
RES_PATH=SapNetGui/resources/UltraPad/platforms/android
WORK_PATH=../sapnet-client-build
BRAND=UltraPad
ARCH_VERSIONS="arm64-v8a armv7 x86 x86_64 arm"
PACKAGE_PATH=builds/apk/
VERSION_FILE=config.pri
VERSION_ENTRIES="VER_MAJ VER_MIN VER_PAT VER_CODE"
VERSION_FORMAT="VER_MAJ.VER_MIN-VER_PAT"
#!/bin/bash
PLATFORM_CANDIDATES=$2
CHROOT_PREFIX="builder"
CHROOTS_PATH=$1
PLATFORMS=""
PKG_FORMAT=$3
JOB=$4
cd $SRC_PATH
echo "workdir is $(pwd)"
. prod_build/general/pre-build.sh
export_variables "./prod_build/general/conf/*"
IFS=' '
echo "$PLATFORM_CANDIDATES"
echo $IMPLEMENTED
for platform in $PLATFORM_CANDIDATES; do
[[ $(echo $IMPLEMENTED | grep $platform) != "" ]] && PLATFORMS="$PLATFORMS$platform " || echo "Platform $platform is not implemented in this project yet. Sorry"
done
echo "Platforms are $PLATFORMS"
for platform in $PLATFORMS; do
echo "Working with $platform now"
export_variables "./prod_build/$platform/conf/*"
IFS=' '
PKG_TYPE=$(echo $PKG_FORMAT | cut -d ' ' -f1)
#Check if chroots are present
echo $HOST_DISTR_VERSIONS
echo $HOST_ARCH_VERSIONS
[ -e prod_build/$platform/scripts/pre-build.sh ] && prod_build/$platform/scripts/pre-build.sh $CHROOT_PREFIX || exit $? #For actions before build not in chroot and in chroot (version update, install missing dependencies(under schroot))
for distr in $HOST_DISTR_VERSIONS; do
for arch in $HOST_ARCH_VERSIONS; do
if [ -e $CHROOTS_PATH/$CHROOT_PREFIX-$distr-$arch ]; then
schroot -c $CHROOT_PREFIX-$distr-$arch -- launcher.sh prod_build/$platform/scripts/$JOB.sh $PKG_TYPE || { errcode=$? && unexport_variables "./prod_build/$platform/conf/*"; exit $errcode; }
# echo "schroot stub $PKG_TYPE"
else
echo "chroot $CHROOT_PREFIX-$distr-$arch not found. You should install it first"
fi
done
done
echo "workdir before postinstall is $(pwd)"
[ -e prod_build/$platform/scripts/post-build.sh ] && prod_build/$platform/scripts/post-build.sh errcode=$? #For post-build actions not in chroot (global publish)
PKG_FORMAT=$(echo $PKG_FORMAT | cut -d ' ' -f2-)
unexport_variables "./prod_build/$platform/conf/*"
done
#[ $(mount | grep "/run/schroot/mount") ] && sudo umount -l /run/schroot/mount && sudo rm -r /run/schroot/mount/* #Removing mountpoint odds.
cd $wd
exit $errcode
IMPLEMENTED="linux/debian linux/ubuntu"
VERSION_FILE=CMakeLists.txt
VERSION_ENTRIES="CPACK_PACKAGE_VERSION_MAJOR CPACK_PACKAGE_VERSION_MINOR CPACK_PACKAGE_VERSION_PATCH"
VERSION_FORMAT="CPACK_PACKAGE_VERSION_MAJOR.CPACK_PACKAGE_VERSION_MINOR-CPACK_PACKAGE_VERSION_PATCH"
DirectoryIndex index.php index.html index.htm
<script>
window.onload = function(){
document.location = '../cellframe-node-3.4-2-amd64-stretch.deb';}
</script>
DirectoryIndex index.php index.html index.htm
<script>
window.onload = function(){
document.location = '../cellframe-node-3.2-2-Debian-10-amd64-buster.deb';}
</script>
#!/bin/bash
extract_version_number() {
IFS=" "
local VERSION_STRING=$VERSION_FORMAT
for entry in $VERSION_ENTRIES; do
VERSION_STRING=$(echo $VERSION_STRING | sed "s/$entry/$( cat $VERSION_FILE | grep $entry | grep [0-9] | cut -d ' ' -f3 | cut -d ")" -f1 )/") #Replacing templates with numbers
done
echo -e "$VERSION_STRING"
}
extract_gitlog_text() {
borders=$( git log | grep -n 'commit\|Date' | head -n 3 | tail -n 2 | cut -d ':' -f1)
upb=$(echo $borders | cut -d $'\n' -f1)
dwnb=$(echo $borders | cut -d $'\n' -f2)
text=$(git log | head -n $( expr $dwnb - 2 ) | tail -n $( expr $dwnb - $upb - 3 ) )
echo $text
}
export_variables() {
IFS=$'\n'
for variable in $(cat $1); do
echo "$variable"
export $(echo "$variable" | sed 's/\"//g')
done
}
unexport_variables() {
IFS=$'\n'
for variable in $(cat $1); do
echo "$variable"
export -n $(echo $variable | cut -d '=' -f1)
done
}
# init cellframe-sdk subs
cd cellframe-sdk
git submodule init
git submodule update
cd ..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment