Supplementary merge

This commit is contained in:
Geoffrey Frogeye 2017-02-12 13:29:03 +01:00
parent e653fe10b0
commit cb8ca9c904
2 changed files with 49 additions and 20 deletions

View file

@ -234,7 +234,7 @@ function debloc_env {
export PATH="$DEBLOC_ROOT/usr/bin:$DEBLOC_ROOT/usr/games/:$DEBLOC_ROOT/usr/lib/git-core:$PATH" export PATH="$DEBLOC_ROOT/usr/bin:$DEBLOC_ROOT/usr/games/:$DEBLOC_ROOT/usr/lib/git-core:$PATH"
export LIBRARY_PATH="$DEBLOC_LD:$LIBRARY_PATH" export LIBRARY_PATH="$DEBLOC_LD:$LIBRARY_PATH"
export C_INCLUDE_PATH="$DEBLOC_ROOT/usr/include:$C_INCLUDE_PATH" export C_INCLUDE_PATH="$DEBLOC_ROOT/usr/include:$C_INCLUDE_PATH"
export CPLUS_INCLUDE_PATH="$DEBLOC_ROOT/usr/include:$CPLUS_INCLUDE_PATH" export CPLUS_INCLUDE_PATH="$DEBLOC_ROOT/usr/include:$DEBLOC_ROOT/usr/include/python2.7/:$DEBLOC_ROOT/usr/include/x86_64-linux-gnu/python2.7/:$CPLUS_INCLUDE_PATH"
export LD_LIBRARY_PATH="$DEBLOC_LD:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$DEBLOC_LD:$LD_LIBRARY_PATH"
export PYTHONPATH="$DEBLOC_ROOT/usr/lib/python3/dist-packages:$PYTHONPATH" export PYTHONPATH="$DEBLOC_ROOT/usr/lib/python3/dist-packages:$PYTHONPATH"
export QT_QPA_PLATFORM_PLUGIN_PATH="$DEBLOC_ROOT/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" export QT_QPA_PLATFORM_PLUGIN_PATH="$DEBLOC_ROOT/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms"
@ -291,7 +291,6 @@ function debloc_deb_help {
echo " PATH Path to the .deb file" echo " PATH Path to the .deb file"
return 0 return 0
} }
function debloc_deb { # path function debloc_deb { # path
if [ -z $1 ]; then if [ -z $1 ]; then
debloc_deb_help debloc_deb_help
@ -308,6 +307,34 @@ function debloc_deb { # path
} }
function debloc_altern_help {
echo "Usage: $0 altern PROGRAM ALTERNATIVE"
echo
echo "Arguments:"
echo " PROGRAM Program to set the alternative for"
echo " ALTERNATIVE Alternative to set"
echo
echo "Examples:"
echo " $0 altern vim nox"
echo " $0 altern dmenu xft"
return 0
}
function debloc_altern { # program alternative
if [ -z $1 || -z $2 ]; then
debloc_altern_help
fi
dest="$DEBLOC_ROOT/usr/bin/$1"
alte="$DEBLOC_ROOT/usr/bin/$1.$2"
if [ ! -f "$alt" ]; then
echo "Unknown alternative for $1 : $2"
exit 1
fi
if [ -e "$dest" ]; then
rm $dest
fi
ln -s "$alte" "$dest"
}
function debloc_flush { function debloc_flush {
rm -rf $DEBLOC_ROOT/* &> /dev/null rm -rf $DEBLOC_ROOT/* &> /dev/null
rm -f $DEBLOC_DB/* &> /dev/null rm -f $DEBLOC_DB/* &> /dev/null
@ -330,6 +357,7 @@ function debloc_help {
echo " info Gives some information about the fake filesystem" echo " info Gives some information about the fake filesystem"
echo " install Install a debian package in the fake filesystem" echo " install Install a debian package in the fake filesystem"
echo " deb Install from a .deb file in the fake filesystem" echo " deb Install from a .deb file in the fake filesystem"
echo " altern Update alternative"
echo " flush Remove every package installed from the fake filesystem" echo " flush Remove every package installed from the fake filesystem"
echo " help Get help with commands" echo " help Get help with commands"
echo echo

View file

@ -123,10 +123,10 @@ elif which dpkg &> /dev/null; then
} }
else else
function installOne { # package function installOne { # package
debloc-install $1 debloc install $1
} }
function installFileOne { # file function installFileOne { # file
debloc-deb "$1" debloc deb "$1"
} }
fi fi
function altInstallOne { function altInstallOne {
@ -192,15 +192,15 @@ elif [ $ARCH == 1 ]; then
else else
inst make inst make
fi fi
inst git cmake clang llvm inst git
# Text editor # Text editor
if [ $TERMUX == 1 ]; then if [ $TERMUX == 1 ]; then
inst vim-python inst vim-python
elif [ $DEBIAN == 1 ]; then elif [ $DEBIAN == 1 ]; then
inst vim-youcompleteme inst vim-nox
ln -s $DEBLOC_ROOT/usr/bin/vim{.nox,} debloc altern vim nox
else else
inst vim inst vim
fi fi
@ -213,16 +213,14 @@ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall vim +PluginInstall +qall
# YouCompleteMe (vim plugin) # YouCompleteMe (vim plugin)
if [ $DEBIAN != 1 ]; then
if [ $DEBIAN == 1 || $TERMUX == 1 ]; then if [ $DEBIAN == 1 || $TERMUX == 1 ]; then
inst python-dev python3-dev inst python-dev python3-dev
fi fi
local YCM_ARGS="" local YCM_ARGS=""
if [ $TERMUX == 0 ]; then if [ $TERMUX != 1 ]; then
YCM_ARGS="$YCM_ARGS --clang-completer --tern-completer" YCM_ARGS="$YCM_ARGS --clang-completer --tern-completer"
fi fi
python $HOME/.vim/bundle/YouCompleteMe/install.py $YCM_ARGS python $HOME/.vim/bundle/YouCompleteMe/install.py $YCM_ARGS
fi
# Common GUI # Common GUI
@ -232,7 +230,7 @@ if [ $GUI == 1 ]; then
if [ $DEBIAN == 1 ]; then if [ $DEBIAN == 1 ]; then
inst suckless-tools inst suckless-tools
if [ $ADMIN == 0 ]; then if [ $ADMIN == 0 ]; then
ln -s $DEBLOC_ROOT/usr/bin/dmenu{.xft,} debloc altern dmenu xft
fi fi
else else
inst dmenu inst dmenu
@ -257,11 +255,11 @@ if [ $GUI == 1 ]; then
# Screen filter # Screen filter
if [ $ARCH == 1 ]; then if [ $ARCH == 1 ]; then
altInst sct altInst sct
elif [ $DEBIAN == 1 ]; then elif [ $TERMUX != 1 ]; then
if [ ! -f $DEBLOC_ROOT/usr/bin/sct ]; then if [ ! -f $HOME/.gscripts/sct ]; then
TMP=$(mktemp) TMP=$(mktemp)
wget http://www.tedunangst.com/flak/files/sct.c -O $TMP wget http://www.tedunangst.com/flak/files/sct.c -O $TMP
cc -std=c99 -O2 -I /usr/X11R6/include -o $DEBLOC_ROOT/usr/bin/sct $TMP -L /usr/X11R6/lib -lm -lX11 -lXrandr cc -std=c99 -O2 -I /usr/X11R6/include -o $HOME/.gscripts/sct $TMP -L /usr/X11R6/lib -lm -lX11 -lXrandr
fi fi
fi fi
@ -274,6 +272,9 @@ if [ $GUI == 1 ]; then
fi fi
if [ $EXTRA == 1 ]; then if [ $EXTRA == 1 ]; then
# Extra dev
inst cmake clang llvm
# Extra CLI # Extra CLI
inst sl ffmpeg youtube-dl inst sl ffmpeg youtube-dl