Lil thingies
This commit is contained in:
parent
78f7d99b09
commit
5903c0a437
2
bashrc
2
bashrc
|
@ -32,9 +32,11 @@ export BROWSER=/usr/bin/qutebrowser
|
||||||
export TZ=/usr/share/zoneinfo/Europe/Paris
|
export TZ=/usr/share/zoneinfo/Europe/Paris
|
||||||
|
|
||||||
export PATH="$PATH"
|
export PATH="$PATH"
|
||||||
|
if [ -d $HOME/.gem/ruby ]; then
|
||||||
$(which ls) $HOME/.gem/ruby | while read rubyVer; do
|
$(which ls) $HOME/.gem/ruby | while read rubyVer; do
|
||||||
export PATH="$PATH:$HOME/.gem/ruby/$rubyVer/bin/"
|
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 PATH="$(echo "$PATH" | sed 's|:|\n|g' | sort | uniq | tr '\n' ':' | sed 's|:$||')"
|
||||||
export LANG=fr_FR.utf8
|
export LANG=fr_FR.utf8
|
||||||
export HISTSIZE=10000
|
export HISTSIZE=10000
|
||||||
|
|
|
@ -17,7 +17,7 @@ DEBLOC_LD=$DEBLOC_ROOT/ld
|
||||||
|
|
||||||
if [ -z $DEBIAN_MIRROR ]; then
|
if [ -z $DEBIAN_MIRROR ]; then
|
||||||
DEBIAN_MIRROR="$(cat /etc/apt/sources.list | grep '^deb ' | grep main | grep -v backports)"
|
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
|
fi
|
||||||
|
|
||||||
mkdir -p $DEBLOC_DB &> /dev/null
|
mkdir -p $DEBLOC_DB &> /dev/null
|
||||||
|
@ -94,8 +94,11 @@ function _debloc-globallyInstalled { # package
|
||||||
function _debloc-packageShow { # package
|
function _debloc-packageShow { # package
|
||||||
pkg=$1
|
pkg=$1
|
||||||
if [[ -n $DEBIAN_DB && -f $DEBIAN_DB ]]; then
|
if [[ -n $DEBIAN_DB && -f $DEBIAN_DB ]]; then
|
||||||
startline=$(grep "^Package: ${pkg}\$" $DEBIAN_DB --line-number | cut -d ':' -f 1)
|
startline=$(grep "^Package: ${pkg}\$" $DEBIAN_DB --line-number | tail -1 | cut -d ':' -f 1)
|
||||||
sed -n $startline,$(expr $startline + 100)p $DEBIAN_DB | while read line; do
|
if [ -z "$startline" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
sed -n "$startline,$(expr $startline + 100)p" $DEBIAN_DB | while read line; do
|
||||||
if [ -z "$line" ]; then
|
if [ -z "$line" ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -107,7 +110,7 @@ function _debloc-packageShow { # package
|
||||||
if [ -z "$line" ]; then
|
if [ -z "$line" ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
echo $line
|
echo "$line"
|
||||||
done
|
done
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -184,7 +187,7 @@ function _debloc-install { # package
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ! -s $DEB_FILE ]; then
|
if [ ! -s $DEB_FILE ]; then
|
||||||
echo "→ Failed!"
|
echo "→ Failed (no deb file)!"
|
||||||
rm $DEBLOC_DB/$pkg &> /dev/null
|
rm $DEBLOC_DB/$pkg &> /dev/null
|
||||||
return 4
|
return 4
|
||||||
fi
|
fi
|
||||||
|
@ -194,7 +197,7 @@ function _debloc-install { # package
|
||||||
real=$(md5sum $DEB_FILE | cut -d ' ' -f 1)
|
real=$(md5sum $DEB_FILE | cut -d ' ' -f 1)
|
||||||
if [ "$theo" != "$real" ]; then
|
if [ "$theo" != "$real" ]; then
|
||||||
rm -f $DEB_FILE &> /dev/null
|
rm -f $DEB_FILE &> /dev/null
|
||||||
echo "→ Failed!"
|
echo "→ Failed (sum doesn't match)!"
|
||||||
rm $DEBLOC_DB/$pkg &> /dev/null
|
rm $DEBLOC_DB/$pkg &> /dev/null
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
# (sourceable)
|
# (sourceable)
|
||||||
|
|
||||||
function install-preferences {
|
function install-preferences {
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
function prompt { # text
|
function prompt { # text
|
||||||
while true; do
|
while true; do
|
||||||
|
@ -172,12 +171,12 @@ function install-preferences {
|
||||||
inst grep sed sh tar
|
inst grep sed sh tar
|
||||||
if [ $TERMUX == 1 ]; then
|
if [ $TERMUX == 1 ]; then
|
||||||
inst coreutils man termux-api openssl-tool
|
inst coreutils man termux-api openssl-tool
|
||||||
if [ $ROOT == 1 ]; then
|
if [ $ADMIN == 1 ]; then
|
||||||
inst tsu
|
inst tsu
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
inst moreutils screen ncdu lsof htop proxytunnel pass pv curl wget sshfs netcat
|
inst moreutils screen ncdu lsof htop proxytunnel pass pv curl wget sshfs netcat
|
||||||
if [[ $ARCH == 1 && $ROOT == 1 ]]; then
|
if [[ $ARCH == 1 && $ADMIN == 1 ]]; then
|
||||||
inst pkgfile
|
inst pkgfile
|
||||||
systemctl enable pkgfile-update.timer
|
systemctl enable pkgfile-update.timer
|
||||||
fi
|
fi
|
||||||
|
@ -194,15 +193,14 @@ function install-preferences {
|
||||||
|
|
||||||
|
|
||||||
# Text editor
|
# Text editor
|
||||||
if [ $GUI == 1 ]; then
|
|
||||||
inst gvim
|
|
||||||
else
|
|
||||||
if [ $TERMUX == 1 ]; then
|
if [ $TERMUX == 1 ]; then
|
||||||
inst vim-python
|
inst vim-python
|
||||||
|
elif [ $DEBIAN == 1 ]; then
|
||||||
|
inst vim-youcompleteme
|
||||||
|
ln -s $DEBLOC_ROOT/usr/bin/vim{.nox,}
|
||||||
else
|
else
|
||||||
inst vim
|
inst vim
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
if [ $DEBIAN == 1 ]; then
|
if [ $DEBIAN == 1 ]; then
|
||||||
inst exuberant-ctags
|
inst exuberant-ctags
|
||||||
else
|
else
|
||||||
|
@ -212,6 +210,7 @@ function install-preferences {
|
||||||
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
|
||||||
|
@ -219,18 +218,18 @@ function install-preferences {
|
||||||
if [ $TERMUX == 0 ]; then
|
if [ $TERMUX == 0 ]; 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.python $YCM_ARGS
|
fi
|
||||||
|
|
||||||
# Common GUI
|
# Common GUI
|
||||||
|
|
||||||
if [ $GUI == 1 ]; then
|
if [ $GUI == 1 ]; then
|
||||||
# Desktop manager
|
# 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
|
if [ $DEBIAN == 1 ]; then
|
||||||
inst suckles-tools
|
inst suckless-tools
|
||||||
if [ ! $ROOT == 1 ]; then
|
if [ $ADMIN == 0 ]; then
|
||||||
ln -s $DEBLOC_ROOT/bin/dmenu{.xft,}
|
ln -s $DEBLOC_ROOT/usr/bin/dmenu{.xft,}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
inst dmenu
|
inst dmenu
|
||||||
|
@ -241,16 +240,22 @@ function install-preferences {
|
||||||
|
|
||||||
# qutebrowser
|
# qutebrowser
|
||||||
if [ $DEBIAN == 1 ]; then
|
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)
|
TMP_DIR=$(mktemp -d)
|
||||||
$(cd $TMP_DIR; wget --quiet https://qutebrowser.org/python3-pypeg2_2.15.2-1_all.deb)
|
$(cd $TMP_DIR; wget 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://github.com/qutebrowser/qutebrowser/releases/download/v0.9.1/qutebrowser_0.9.1-2_all.deb)
|
||||||
instFile $TMP_DIR/*.deb
|
instFile $TMP_DIR/*.deb
|
||||||
rm -rf $TMP_DIR
|
rm -rf $TMP_DIR
|
||||||
|
|
||||||
elif [ $ARCH == 1 ]; then
|
elif [ $ARCH == 1 ]; then
|
||||||
altInst qutebrowser
|
altInst qutebrowser
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $DEBIAN == 1 ]; then
|
||||||
|
inst vim-gtk
|
||||||
|
else
|
||||||
|
inst gvim
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $EXTRA == 1 ]; then
|
if [ $EXTRA == 1 ]; then
|
||||||
|
|
Loading…
Reference in a new issue