Compare commits
No commits in common. "8640f564373016be045641daab241ced0a2c593a" and "4dd63ca7a421dc28cb9662cebe263962f3a7bc1b" have entirely different histories.
8640f56437
...
4dd63ca7a4
|
|
@ -57,21 +57,21 @@ EOF
|
|||
case "$1" in
|
||||
--cron) timer="cron $2"; shift 2 ;;
|
||||
--systemd) timer="systemd $2"; shift 2 ;;
|
||||
--dir) kind=dir; prefix="$(realpath "$2" 2>/dev/null)" || prefix="$2"; shift 2 ;;
|
||||
--dir) kind=dir; prefix="$(realpath "$2")"; shift 2 ;;
|
||||
--url) kind=url; prefix="$2"; shift 2 ;;
|
||||
--appid) kind=appid; prefix="$2"; shift 2 ;;
|
||||
*) usage; return 1 ;;
|
||||
esac
|
||||
done
|
||||
while [[ "$prefix" == /* ]]; do
|
||||
prefix="${prefix#/}"
|
||||
done
|
||||
if [[ -z "$prefix" || -z "$timer" ]]; then
|
||||
usage
|
||||
return 1
|
||||
fi
|
||||
while [[ "$prefix" == /* ]]; do
|
||||
prefix="${prefix#/}"
|
||||
done
|
||||
if [[ -n "${CWDCONTROL_SETTINGS["$kind /$prefix"]}" ]]; then
|
||||
echo "Warning: cwdcontrol-disallow ${orig[*]} is a duplciate"
|
||||
echo "Warning: ${orig[*]} is a duplciate"
|
||||
fi
|
||||
CWDCONTROL_SETTINGS["$kind /$prefix"]="$timer"
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue