Skip to content

Instantly share code, notes, and snippets.

@paulmenzel
Created September 5, 2019 18:42
Show Gist options
  • Save paulmenzel/151fe64f33404564804fffd0be6495fe to your computer and use it in GitHub Desktop.
Save paulmenzel/151fe64f33404564804fffd0be6495fe to your computer and use it in GitHub Desktop.
Humblebee
#!/bin/sh
# https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-value-pairs
# PKGVERSION=( 2.6.5 2 2.6 2.6.5 ) give trouble
export $(beeversion ${@} | grep PKGFULLPKG | xargs)
HOME=/dev/shm
# needed for some reason
#sudo -u build mkdir $TMP/build_home
# set PREFIX
sudo -u build BEE_TMP_TMPDIR=/dev/shm BEE_TMP_BUILDROOT=/dev/shm/bee-build HOME=$HOME PREFIX=/scratch/local2/ "${@}" -c
fileno1=`tar --list -f "$HOME/.local/src/bee/packages/$PKGFULLPKG.x86_64.bee.tar.bz2" | wc -l`
fileno2=`tar --list -f "/src/mariux/beeroot/packages/$PKGFULLPKG.x86_64.bee.tar.bz2" | wc -l`
if [ $fileno1 -ne $fileno2 ]
then
echo "Humblebee is very sad: $fileno1 != $fileno2"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment