config: various script adjustments & enable context
This commit is contained in:
parent
332518fae5
commit
9e46b4c615
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Backup root filesystem with borg
|
# Backup root filesystem with borg
|
||||||
|
root="/"
|
||||||
args="--progress --stats"
|
args="--progress --stats"
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -7,9 +8,10 @@ while test $# -gt 0; do
|
||||||
(--dry-run) args="--dry-run --list"; name=test-$(date +%s); shift;;
|
(--dry-run) args="--dry-run --list"; name=test-$(date +%s); shift;;
|
||||||
(--root) shift; root="$1"; name="$(basename "$(realpath "$root")")"; echo $root $name; shift;;
|
(--root) shift; root="$1"; name="$(basename "$(realpath "$root")")"; echo $root $name; shift;;
|
||||||
(-*) name="${1#-}"; shift;;
|
(-*) name="${1#-}"; shift;;
|
||||||
(*) test $# -gt 0 || cd "$root"; break;;
|
(*) break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
test $# -gt 0 || cd "$root"
|
||||||
name="::$(test -n "$name" && echo "$name" || cat /etc/hostname)_${1:-system}_$(date -u +"%y%m%d")"
|
name="::$(test -n "$name" && echo "$name" || cat /etc/hostname)_${1:-system}_$(date -u +"%y%m%d")"
|
||||||
echo "Backing up as $name"
|
echo "Backing up as $name"
|
||||||
${run:-sudo --preserve-env=BORG_REPO borg} create --exclude-caches $args \
|
${run:-sudo --preserve-env=BORG_REPO borg} create --exclude-caches $args \
|
||||||
|
|
|
@ -6,6 +6,7 @@ sudo hdparm -MWAgt "$disk"
|
||||||
if test $# -eq 0
|
if test $# -eq 0
|
||||||
then echo "Write test:"
|
then echo "Write test:"
|
||||||
sync
|
sync
|
||||||
|
#sudo dd status=progress if=/dev/random of=/var/tmp/tempfile bs=1M count=1K && sudo dd status=progress if=/var/tmp/tempfile of=tempfile bs=1M count=1K
|
||||||
sudo dd status=progress if=/dev/zero of=tempfile bs=1M count=1K
|
sudo dd status=progress if=/dev/zero of=tempfile bs=1M count=1K
|
||||||
sudo rm tempfile
|
sudo rm tempfile
|
||||||
fi
|
fi
|
||||||
|
|
2
.zshenv
2
.zshenv
|
@ -71,7 +71,7 @@ export DIRS_IGNORE="-x *build -x .git -x .idea -x out -x cache -x Partitions $DI
|
||||||
# red stderr
|
# red stderr
|
||||||
test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
||||||
# software config
|
# software config
|
||||||
#export TEXMF=/usr/share/context
|
export TEXMF=/usr/share/context
|
||||||
export KSCRIPT_IDEA_COMMAND=intellij-idea-ultimate-edition
|
export KSCRIPT_IDEA_COMMAND=intellij-idea-ultimate-edition
|
||||||
## enable pass extensions
|
## enable pass extensions
|
||||||
export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
|
export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
|
||||||
|
|
Loading…
Reference in New Issue