Merge branch 'master' of frogit:geoffrey/dotfiles
This commit is contained in:
commit
7f7b011d4a
6
bashrc
6
bashrc
|
@ -32,9 +32,11 @@ export BROWSER=/usr/bin/qutebrowser
|
|||
export TZ=/usr/share/zoneinfo/Europe/Paris
|
||||
|
||||
export PATH="$PATH"
|
||||
$(which ls) $HOME/.gem/ruby | while read rubyVer; do
|
||||
if [ -d $HOME/.gem/ruby ]; then
|
||||
$(which ls) $HOME/.gem/ruby | while read rubyVer; do
|
||||
export PATH="$PATH:$HOME/.gem/ruby/$rubyVer/bin/"
|
||||
done
|
||||
done
|
||||
fi
|
||||
export PATH="$(echo "$PATH" | sed 's|:|\n|g' | sort | uniq | tr '\n' ':' | sed 's|:$||')"
|
||||
export LANG=fr_FR.utf8
|
||||
export HISTSIZE=10000
|
||||
|
|
|
@ -17,19 +17,22 @@ DEBLOC_LD=$DEBLOC_ROOT/ld
|
|||
|
||||
if [ -z $DEBIAN_MIRROR ]; then
|
||||
DEBIAN_MIRROR="$(cat /etc/apt/sources.list | grep '^deb ' | grep main | grep -v backports)"
|
||||
DEBIAN_MIRROR="$(echo -e "$DEBIAN_MIRROR" | cut -d ' ' -f 2 | sed 's/\/$//')"
|
||||
DEBIAN_MIRROR="$(echo -e "$DEBIAN_MIRROR" | cut -d ' ' -f 2 | sed 's/\/$//' | sort | uniq)"
|
||||
fi
|
||||
|
||||
mkdir -p $DEBLOC_DB &> /dev/null
|
||||
mkdir -p $DEBLOC_ROOT &> /dev/null
|
||||
|
||||
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 C_INCLUDE_PATH="$DEBLOC_ROOT/usr/include:$C_INCLUDE_PATH"
|
||||
export CPLUS_INCLUDE_PATH="$DEBLOC_ROOT/usr/include:$CPLUS_INCLUDE_PATH"
|
||||
export LD_LIBRARY_PATH="$DEBLOC_LD:$LD_LIBRARY_PATH"
|
||||
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"
|
||||
function _debloc-setVars {
|
||||
export PATH="$1/usr/bin:$1/usr/games/:$1/usr/lib/git-core:$PATH"
|
||||
export LIBRARY_PATH="$2:$LIBRARY_PATH"
|
||||
export C_INCLUDE_PATH="$1/usr/include:$C_INCLUDE_PATH"
|
||||
export CPLUS_INCLUDE_PATH="$1/usr/include:$CPLUS_INCLUDE_PATH"
|
||||
export LD_LIBRARY_PATH="$2:$LD_LIBRARY_PATH"
|
||||
export PYTHONPATH="$1/usr/lib/python3/dist-packages:$PYTHONPATH"
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH="$1/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms"
|
||||
}
|
||||
_debloc-setVars "$DEBLOC_ROOT" "$DEBLOC_LD"
|
||||
|
||||
# Tell if a package exists
|
||||
function _debloc-exists { # package
|
||||
|
@ -94,8 +97,11 @@ function _debloc-globallyInstalled { # package
|
|||
function _debloc-packageShow { # package
|
||||
pkg=$1
|
||||
if [[ -n $DEBIAN_DB && -f $DEBIAN_DB ]]; then
|
||||
startline=$(grep "^Package: ${pkg}\$" $DEBIAN_DB --line-number | cut -d ':' -f 1)
|
||||
sed -n $startline,$(expr $startline + 100)p $DEBIAN_DB | while read line; do
|
||||
startline=$(grep "^Package: ${pkg}\$" $DEBIAN_DB --line-number | tail -1 | cut -d ':' -f 1)
|
||||
if [ -z "$startline" ]; then
|
||||
return 0
|
||||
fi
|
||||
sed -n "$startline,$(expr $startline + 100)p" $DEBIAN_DB | while read line; do
|
||||
if [ -z "$line" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
@ -107,7 +113,7 @@ function _debloc-packageShow { # package
|
|||
if [ -z "$line" ]; then
|
||||
return 0
|
||||
fi
|
||||
echo $line
|
||||
echo "$line"
|
||||
done
|
||||
return 0
|
||||
fi
|
||||
|
@ -184,7 +190,7 @@ function _debloc-install { # package
|
|||
fi
|
||||
done
|
||||
if [ ! -s $DEB_FILE ]; then
|
||||
echo "→ Failed!"
|
||||
echo "→ Failed (no deb file)!"
|
||||
rm $DEBLOC_DB/$pkg &> /dev/null
|
||||
return 4
|
||||
fi
|
||||
|
@ -194,7 +200,7 @@ function _debloc-install { # package
|
|||
real=$(md5sum $DEB_FILE | cut -d ' ' -f 1)
|
||||
if [ "$theo" != "$real" ]; then
|
||||
rm -f $DEB_FILE &> /dev/null
|
||||
echo "→ Failed!"
|
||||
echo "→ Failed (sum doesn't match)!"
|
||||
rm $DEBLOC_DB/$pkg &> /dev/null
|
||||
return 5
|
||||
fi
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
# (sourceable)
|
||||
|
||||
function install-preferences {
|
||||
|
||||
# Configuration
|
||||
function prompt { # text
|
||||
while true; do
|
||||
|
@ -172,7 +171,7 @@ function install-preferences {
|
|||
inst grep sed sh tar
|
||||
if [ $TERMUX == 1 ]; then
|
||||
inst coreutils man termux-api openssl-tool
|
||||
if [ $ROOT == 1 ]; then
|
||||
if [ $ADMIN == 1 ]; then
|
||||
inst tsu
|
||||
fi
|
||||
fi
|
||||
|
@ -182,7 +181,7 @@ function install-preferences {
|
|||
else
|
||||
inst pass
|
||||
fi
|
||||
if [[ $ARCH == 1 && $ROOT == 1 ]]; then
|
||||
if [[ $ARCH == 1 && $ADMIN == 1 ]]; then
|
||||
inst pkgfile
|
||||
systemctl enable pkgfile-update.timer
|
||||
fi
|
||||
|
@ -199,15 +198,14 @@ function install-preferences {
|
|||
|
||||
|
||||
# Text editor
|
||||
if [ $GUI == 1 ]; then
|
||||
inst gvim
|
||||
else
|
||||
if [ $TERMUX == 1 ]; then
|
||||
inst vim-python
|
||||
elif [ $DEBIAN == 1 ]; then
|
||||
inst vim-youcompleteme
|
||||
ln -s $DEBLOC_ROOT/usr/bin/vim{.nox,}
|
||||
else
|
||||
inst vim
|
||||
fi
|
||||
fi
|
||||
if [ $DEBIAN == 1 ]; then
|
||||
inst exuberant-ctags
|
||||
else
|
||||
|
@ -217,6 +215,7 @@ function install-preferences {
|
|||
vim +PluginInstall +qall
|
||||
|
||||
# YouCompleteMe (vim plugin)
|
||||
if [ $DEBIAN != 1 ]; then
|
||||
if [ $DEBIAN == 1 || $TERMUX == 1 ]; then
|
||||
inst python-dev python3-dev
|
||||
fi
|
||||
|
@ -224,18 +223,18 @@ function install-preferences {
|
|||
if [ $TERMUX == 0 ]; then
|
||||
YCM_ARGS="$YCM_ARGS --clang-completer --tern-completer"
|
||||
fi
|
||||
|
||||
python $HOME/.vim/bundle/YouCompleteMe/install.python $YCM_ARGS
|
||||
python $HOME/.vim/bundle/YouCompleteMe/install.py $YCM_ARGS
|
||||
fi
|
||||
|
||||
# Common GUI
|
||||
|
||||
if [ $GUI == 1 ]; then
|
||||
# Desktop manager
|
||||
inst i3 i3lock dmenu dunst unclutter xautolock feh numlockx scrot
|
||||
inst i3 i3lock i3status dunst unclutter xautolock feh numlockx scrot
|
||||
if [ $DEBIAN == 1 ]; then
|
||||
inst suckles-tools
|
||||
if [ ! $ROOT == 1 ]; then
|
||||
ln -s $DEBLOC_ROOT/bin/dmenu{.xft,}
|
||||
inst suckless-tools
|
||||
if [ $ADMIN == 0 ]; then
|
||||
ln -s $DEBLOC_ROOT/usr/bin/dmenu{.xft,}
|
||||
fi
|
||||
else
|
||||
inst dmenu
|
||||
|
@ -246,10 +245,10 @@ function install-preferences {
|
|||
|
||||
# qutebrowser
|
||||
if [ $DEBIAN == 1 ]; then
|
||||
inst python3-lxml python-tox python3-pyqt5 python3-pyqt5.qtwebkit python3-sip python3-jinja2 python3-pygments python3-yaml
|
||||
inst python3-lxml python-tox python3-pyqt5 python3-pyqt5.qtwebkit python3-pyqt5.qtquick python3-sip python3-jinja2 python3-pygments python3-yaml
|
||||
TMP_DIR=$(mktemp -d)
|
||||
$(cd $TMP_DIR; wget --quiet https://qutebrowser.org/python3-pypeg2_2.15.2-1_all.deb)
|
||||
$(cd $TMP_DIR; wget --quiet https://github.com/The-Compiler/qutebrowser/releases/download/v0.8.4/qutebrowser_0.8.4-1_all.deb)
|
||||
$(cd $TMP_DIR; wget https://qutebrowser.org/python3-pypeg2_2.15.2-1_all.deb)
|
||||
$(cd $TMP_DIR; wget https://github.com/qutebrowser/qutebrowser/releases/download/v0.9.1/qutebrowser_0.9.1-2_all.deb)
|
||||
instFile $TMP_DIR/*.deb
|
||||
rm -rf $TMP_DIR
|
||||
|
||||
|
@ -266,6 +265,10 @@ function install-preferences {
|
|||
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
|
||||
fi
|
||||
if [ $DEBIAN == 1 ]; then
|
||||
inst vim-gtk
|
||||
else
|
||||
inst gvim
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue