Created
May 30, 2018 01:29
-
-
Save imyxh/13a49a36798fc4870325169a384630af to your computer and use it in GitHub Desktop.
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 characters
RUN_SCRIPT_PATH=$HOME/gimp-git/run | |
post_install() { | |
cat > $RUN_SCRIPT_PATH <<-EOF | |
#!/bin/sh | |
# update as necessary | |
DIR_VERSION=2.99 | |
EOF | |
cat >> $RUN_SCRIPT_PATH <<-'EOF' | |
# set the path to the installation directory | |
export INSTALL_PREFIX=$HOME/gimp-git/usr | |
# link stuff because for some reason GIMP is still looking in the wrong place | |
if [ ! -L /usr/share/gimp/$DIR_VERSION ]; then | |
echo "I need sudo to make a symlink from /usr/share/gimp/$DIR_VERSION to" \ | |
"$INSTALL_PREFIX/share/gimp/$DIR_VERSION" | |
sudo ln -sf $INSTALL_PREFIX/share/gimp/$DIR_VERSION \ | |
/usr/share/gimp/$DIR_VERSION | |
fi | |
# set the path to the directory into which we download the sources | |
export SRC_DIR=$HOME/aur/gimp-git/src | |
# Now, set mandatory enviroment variables | |
export PATH=$INSTALL_PREFIX/bin:$PATH | |
export LD_LIBRARY_PATH=$INSTALL_PREFIX/lib:$LD_LIBRARY_PATH | |
# not needed for running GIMP directly, but needed if you want to compile | |
# anything against our builds (think of plug-ins, etc.) | |
export PKG_CONFIG_PATH=$INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH | |
# Now you can run executables our other stuff depending on our environment | |
# Here we run GIMP, and pass it any arguments given to this script | |
$INSTALL_PREFIX/bin/gimp-$DIR_VERSION $@ | |
EOF | |
} | |
# post_upgrade() { | |
# sed s/$2/$1/ < $RUN_SCRIPT_PATH > $RUN_SCRIPT_PATH | |
# } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment