24 lines
551 B
Bash
Executable file
24 lines
551 B
Bash
Executable file
#!/bin/sh
|
|
source /etc/profile.sh
|
|
|
|
state(){
|
|
javascript='
|
|
const isoterminal = document.querySelector("[isoterminal]").components.isoterminal.term
|
|
isoterminal.save({'$1':true})
|
|
return "\n"
|
|
'
|
|
|
|
echo "[i] triggering ~/hook.d/save/* scripts"
|
|
hook save
|
|
echo "[i] warning: do not resize the browserwindow"
|
|
echo "[i] please wait.."
|
|
js "$javascript"
|
|
exit
|
|
}
|
|
|
|
test -n "$1" && state "$1"
|
|
test -z "$1" && {
|
|
echo "Usage: save [localstorage|remotestorage]"
|
|
echo ""
|
|
echo "save VM (filesystem) to local (=default) or remotestorage"
|
|
}
|