Skip to content

Instantly share code, notes, and snippets.

@MathieuDuponchelle
Last active November 17, 2016 01:18
Show Gist options
  • Save MathieuDuponchelle/8c8f550d7c2b7a034055c630300c353c to your computer and use it in GitHub Desktop.
Save MathieuDuponchelle/8c8f550d7c2b7a034055c630300c353c to your computer and use it in GitHub Desktop.
#!/bin/bash -i
PREFIX=~/devel/okdaccord
GENIVI_PREFIX=$PREFIX
LD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/lib64
DYLD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/lib64
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/pkgconfig:$PREFIX/lib64/pkgconfig/
PATH=$PREFIX/bin:$PATH
GI_TYPELIB_PATH=$PREFIX/share/gir-1.0:$GI_TYPELIB_PATH
XDG_DATA_HOME=$PREFIX/share
XDG_DATA_DIRS=$XDG_DATA_DIRS:$PREFIX/share
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PREFIX/lib/gstreamer-1.0/
export LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH
export PKG_CONFIG_PATH
export PATH
export GI_TYPELIB_PATH
export XDG_DATA_HOME
export XDG_DATA_DIRS
export GENIVI_PREFIX
if [ -z "$*" ];
then
if [ $SHELL != "/bin/bash" ];
then
APT_ENV="[genivi]" $SHELL
else
cp ~/.bashrc /tmp/aptCustomPS1
echo "export PS1=[genivi]\ \$PS1" >> /tmp/aptCustomPS1
echo 'alias autogen="./autogen.sh --prefix='$PREFIX' --with-systemdunitdir='$PREFIX' --with-systemdsystemunitdir='$PREFIX'"' >> /tmp/aptCustomPS1
echo 'alias cmake="cmake -DCMAKE_INSTALL_PREFIX='$PREFIX'"' >> /tmp/aptCustomPS1
echo 'alias minstall="make && make install"' >> /tmp/aptCustomPS1
/bin/bash --rcfile /tmp/aptCustomPS1
fi
else
/bin/bash -c "$*"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment