2022-12-16 14:23:28 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-12-16 15:33:59 +01:00
|
|
|
. ./sync.conf || . ../sync.conf
|
|
|
|
|
2022-12-16 14:23:28 +01:00
|
|
|
DRY_RUN=${DRY_RUN:-no}
|
|
|
|
|
|
|
|
bool() {
|
|
|
|
case "$1" in
|
|
|
|
1|true|yes|on|TRUE|YES|ON) return 0 ;;
|
|
|
|
*) return 1 ;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
run() {
|
|
|
|
if bool "$DRY_RUN"; then
|
|
|
|
echo "DRY: + $*"
|
|
|
|
else
|
|
|
|
echo "+ $*"
|
|
|
|
"$@"
|
|
|
|
fi
|
|
|
|
}
|
2022-12-16 15:33:59 +01:00
|
|
|
|
|
|
|
is_graphical() {
|
|
|
|
command -v $PREF_TERM && return 0 || return 1
|
|
|
|
}
|