Refactor: DRY

This commit is contained in:
Narvin Singh 2021-10-25 22:43:46 -04:00
parent 1bf05d0972
commit d19eaeb6e9
2 changed files with 5 additions and 3 deletions

6
avdd
View File

@ -43,8 +43,10 @@ DEFAULT_PRE=' '
DEFAULT_SEP_L='| ' DEFAULT_SEP_L='| '
DEFAULT_SEP_R=' ' DEFAULT_SEP_R=' '
DEFAULT_SUF=' ' DEFAULT_SUF=' '
MOD_DIR="$(dirname "$0")"/mod DIR="$(dirname "$0")"
FIFO=/tmp/avdd-fifo-"$("$(dirname "$0")"/rpid $$)" MOD_DIR="${DIR}/mod"
DAEMON="$(basename "$0")"
FIFO="/tmp/${DAEMON}-fifo-$("${DIR}/rpid" $$)"
mod_list="${1-${DEFAULT_MOD_LIST}}" mod_list="${1-${DEFAULT_MOD_LIST}}"

2
avds
View File

@ -75,7 +75,7 @@ if [[ "${mod_list}" =~ ^\>\>\*\ ]]; then
mod_list="${mod_list:4}" mod_list="${mod_list:4}"
is_request_all=1 is_request_all=1
else else
fifo=/tmp/avdd-fifo-"$("$(dirname "$0")"/rpid $$)" fifo="/tmp/${DAEMON}-fifo-$("$(dirname "$0")/rpid" $$)"
fi fi
when="${2:-0}" when="${2:-0}"