bin: various function improvements
This commit is contained in:
parent
c5500b3ee0
commit
9056b4f474
|
@ -371,6 +371,10 @@ alias fc='fossil commit -v'
|
|||
fdf() {
|
||||
fossil diff "$@" | clr
|
||||
}
|
||||
fuu() {
|
||||
rm .fslckout
|
||||
fossil open *.fossil --keep
|
||||
}
|
||||
|
||||
alias gdiff='git diff --word-diff=color --word-diff-regex=. --no-index'
|
||||
|
||||
|
@ -456,15 +460,17 @@ updateDeps() {
|
|||
esac
|
||||
shift 2
|
||||
done
|
||||
echo name "'$name'" depth "'$depth'" pattern "'$oldversion'" version "'$version'"
|
||||
find -maxdepth $depth -not \( -name "*forks" -prune \) -type f -name $name | while read f
|
||||
do highlight $f
|
||||
sed -i "s/\($pattern\)\($oldversion\)/\1${version:-\2}/gw /dev/stdout" $f
|
||||
done
|
||||
echo name "'$name'" depth "'$depth'" pattern "'$oldversion'" version "'$version'" >&2
|
||||
find -maxdepth $depth -not \( -name "*forks" -prune \) -type f -name $name |
|
||||
while read f
|
||||
do highlight $f
|
||||
sed -i "s/\($pattern\)\($oldversion\)/\1${version:-\2}/gw /dev/stdout" $f
|
||||
done
|
||||
}
|
||||
alias updateKotlin="updateDeps build.gradle.kts 'kotlin(\"jvm\") version \"' --version"
|
||||
alias updateGradle='updateDeps gradle-wrapper.properties "services.gradle.org\/distributions\/gradle-" --version'
|
||||
alias updateUtils="updateDeps build.gradle.kts '"'"com.github.Xerus2000.util", ".*", "'" --pattern '[^\"]\+' --version"
|
||||
updateKarma() { rpl "karma-runner.github.io/[^/]\+/" "karma-runner.github.io/$1/"; }
|
||||
|
||||
# Kill all shell background processes
|
||||
alias killbg='kill ${${(v)jobstates##*:*:}%=*}'
|
||||
|
|
|
@ -38,7 +38,7 @@ alias fixmime='sudo rm /usr/share/mime/packages/kde.xml && sudo update-mime-data
|
|||
theme_save="$XDG_CACHE_HOME/theme"
|
||||
#theme_default="$(d=$(date +%H) && test $d -gt 7 && test $d -lt 19 && echo light || echo dark)"
|
||||
theme_default="dark"
|
||||
theme() {
|
||||
themeswitch() {
|
||||
theme="$1"
|
||||
if test "$2" = "kde"
|
||||
then kcmshell5 kcm_lookandfeel
|
||||
|
@ -72,4 +72,4 @@ theme() {
|
|||
}
|
||||
export THEME=$(cat "$theme_save" 2> /dev/null)
|
||||
export THEME=${THEME:-$theme_default}
|
||||
theme $THEME
|
||||
themeswitch $THEME
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh -e
|
||||
#!/bin/sh
|
||||
# Suspend screen until enter is pressed
|
||||
xset dpms force off
|
||||
swaymsg "output * dpms off"
|
||||
read
|
||||
xset dpms force on
|
||||
swaymsg "output * dpms on"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh -ex
|
||||
# Set exec flag on all files that should be executable
|
||||
find -maxdepth 4 -name "*.sh" "$@" -exec chmod -v +x {} +
|
||||
find -maxdepth 4 -name "*.sh" -o -path '*/githooks/*' "$@" -exec chmod -v +x {} +
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#!/bin/sh
|
||||
# Upload website to iridion
|
||||
# TODO: derive from id
|
||||
if test $# -eq 0
|
||||
then echo "$0 site [index.html] [USER]"
|
||||
else
|
||||
site=$1
|
||||
shift
|
||||
scp -r "$@" "iridion:web/$site/public_html$(test "$#" -gt 1 || echo '/index.html')"
|
||||
scp -r "$@" "iridion:/home/${2:-$USER}/web/$site/public_html$(test "$#" -gt 1 || echo '/index.html')"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue