Updates
This commit is contained in:
parent
01d19b1b52
commit
a64e38b305
|
@ -3,7 +3,7 @@
|
||||||
grep -q "gentoo" /etc/os-release || return
|
grep -q "gentoo" /etc/os-release || return
|
||||||
|
|
||||||
lesswrap eix -F
|
lesswrap eix -F
|
||||||
alias eud="emerge -vabuDUN -j4 --keep-going world"
|
alias eud="emerge -vabuDUN --with-bdeps=y --backtrack=300 -j4 --keep-going world"
|
||||||
alias fetchlog="tail -f /var/log/emerge-fetch.log"
|
alias fetchlog="tail -f /var/log/emerge-fetch.log"
|
||||||
alias emerge="noglob sudo -i emerge"
|
alias emerge="noglob sudo -i emerge"
|
||||||
|
|
||||||
|
@ -28,50 +28,3 @@ gpo-get() {
|
||||||
cd "$1/${basename}"
|
cd "$1/${basename}"
|
||||||
ebuild $name digest
|
ebuild $name digest
|
||||||
}
|
}
|
||||||
|
|
||||||
nolto() {
|
|
||||||
pkgenvconf $1 nolto nolto
|
|
||||||
}
|
|
||||||
|
|
||||||
notmpfs() {
|
|
||||||
pkgenvconf $1 notmpfs notmpfs
|
|
||||||
}
|
|
||||||
|
|
||||||
noaggressive() {
|
|
||||||
pkgenvconf $1 noaggressive noaggressive
|
|
||||||
}
|
|
||||||
|
|
||||||
nographite() {
|
|
||||||
pkgenvconf $1 nographite nographite
|
|
||||||
}
|
|
||||||
|
|
||||||
onlysafe() {
|
|
||||||
pkgenvconf $1 onlysafe onlysafe
|
|
||||||
}
|
|
||||||
|
|
||||||
cflags_reset() {
|
|
||||||
if [ -n "$1" ]; then
|
|
||||||
for i in \
|
|
||||||
/etc/portage/package.env/noaggressive \
|
|
||||||
/etc/portage/package.env/nographite \
|
|
||||||
/etc/portage/package.env/nolto; do
|
|
||||||
sed -i "/$1/d" $i;
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgenvconf() {
|
|
||||||
ltoline="$1 $2.conf"
|
|
||||||
echo -e '\e[1mInsert following line into package.env/'$2'?\e[0m'
|
|
||||||
echo "$ltoline"
|
|
||||||
echo "Looking for matching lines..."
|
|
||||||
grep $1 /etc/portage/package.env/$3
|
|
||||||
echo -e -n '\e[1m[y/n] \e[0m'
|
|
||||||
read answer
|
|
||||||
case "$answer" in
|
|
||||||
yes|y|YES|Yes|Really|"why not")
|
|
||||||
echo "$ltoline" | sudo tee -a /etc/portage/package.env/$3
|
|
||||||
;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
17
aliases/void
17
aliases/void
|
@ -19,3 +19,20 @@ sv() {
|
||||||
command sv check "$@"
|
command sv check "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sv-manage() {
|
||||||
|
action=$1
|
||||||
|
shift
|
||||||
|
case "$action" in
|
||||||
|
add)
|
||||||
|
for service in "$@"; do
|
||||||
|
ln -s /etc/sv/${service:s#/##} /var/service
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
remove|rm)
|
||||||
|
for service in "$@"; do
|
||||||
|
rm /var/service/${service:s#/##}
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
8
compdef/_sv-manage
Normal file
8
compdef/_sv-manage
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#compdef sv-manage
|
||||||
|
|
||||||
|
typeset -A opt_args
|
||||||
|
local context state line
|
||||||
|
|
||||||
|
_arguments \
|
||||||
|
"1:Action:(add rm remove)"\
|
||||||
|
"*:service:_files -W /etc/sv"
|
|
@ -52,10 +52,10 @@ bindkey -s "^F" "fuck\n"
|
||||||
# Finally, make sure the terminal is in application mode, when zle is
|
# Finally, make sure the terminal is in application mode, when zle is
|
||||||
# active. Only then are the values from $terminfo valid.
|
# active. Only then are the values from $terminfo valid.
|
||||||
local function zle-line-init () {
|
local function zle-line-init () {
|
||||||
echoti smkx
|
echoti smkx 2> /dev/null
|
||||||
}
|
}
|
||||||
local function zle-line-finish () {
|
local function zle-line-finish () {
|
||||||
echoti rmkx
|
echoti rmkx 2> /dev/null
|
||||||
}
|
}
|
||||||
zle -N zle-line-init
|
zle -N zle-line-init
|
||||||
zle -N zle-line-finish
|
zle -N zle-line-finish
|
||||||
|
|
5
zprofile
5
zprofile
|
@ -26,11 +26,6 @@ export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
# 077 would be more secure, but 022 is generally quite realistic
|
# 077 would be more secure, but 022 is generally quite realistic
|
||||||
umask 022
|
umask 022
|
||||||
|
|
||||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}:$PATH"
|
|
||||||
|
|
||||||
export PATH
|
|
||||||
unset ROOTPATH
|
|
||||||
|
|
||||||
shopts=$-
|
shopts=$-
|
||||||
set -$shopts
|
set -$shopts
|
||||||
unset sh shopts
|
unset sh shopts
|
||||||
|
|
Loading…
Reference in a new issue