Skip to content

Commit

Permalink
copyright, scanner, ydata: improve readability, use cya
Browse files Browse the repository at this point in the history
  • Loading branch information
rdavid committed Dec 14, 2023
1 parent 27fe57d commit 27d35fd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
15 changes: 6 additions & 9 deletions app/copyright
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# vi:et lbr noet sw=2 ts=2 tw=79 wrap
# Copyright 2022-2023 David Rabkin
# Copyright 2022-2023-2023 David Rabkin
# The script uses local variables which are not POSIX but supported by most
# shells, see:
# https://stackoverflow.com/q/18597697
Expand All @@ -18,8 +18,8 @@ BASE_APP_USAGE="$(
}
readonly \
BASE_APP_USAGE \
BASE_APP_VERSION=0.9.20231203 \
BASE_MIN_VERSION=0.9.20231111
BASE_APP_VERSION=0.9.20231214 \
BASE_MIN_VERSION=0.9.20231212
. base.sh

# Analyzes input files, fixes copyright years if needed.
Expand Down Expand Up @@ -66,12 +66,9 @@ main() {
xargs 2>&1
)" || {
local err=$?
if [ "$fil" = "" ]; then
logw Unable to continue, err=$err.
printf '%s is not found.\n' "$PATTERN"
exit 0
fi
die Unable to continue, err=$err, msg="$fil".
[ "$fil" = "" ] || die Unable to continue, err=$err, msg="$fil".
printf '%s is not found.\n' "$PATTERN"
cya Unable to continue, err=$err.
}

# shellcheck disable=SC2086 # No need for double quates.
Expand Down
7 changes: 5 additions & 2 deletions app/scanner
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
# vi:et lbr noet sw=2 ts=2 tw=79 wrap
# Copyright 2020-2023 David Rabkin
# Detects if a device with a certain MAC address is in the local network.
# shellcheck disable=SC1091 # File not following.
# shellcheck disable=SC1091,SC2034 # File not following, variable unused.
readonly \
BASE_APP_VERSION=0.9.20231214 \
BASE_MIN_VERSION=0.9.20231212
. base.sh
MAXV=10
MINV=1
Expand Down Expand Up @@ -55,7 +58,7 @@ validate_cmd arp-scan
[ "$#" -eq 1 ] || die "Usage: $BASE_IAM [MAC-ADDRESS:list]"
[ "$1" = list ] && {
$SCAN
exit 0
cya
}
is_mac "$1"
MACA="$1"
Expand Down
7 changes: 3 additions & 4 deletions app/ydata
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export \

# shellcheck disable=SC2034 # Variable appears unused.
readonly \
BASE_APP_VERSION=0.9.20231126 \
BASE_MIN_VERSION=0.9.20230315
BASE_APP_VERSION=0.9.20231214 \
BASE_MIN_VERSION=0.9.20231212

# shellcheck disable=SC1091 # File not following.
. base.sh
Expand Down Expand Up @@ -114,8 +114,7 @@ download() {
isempty "$VID" || return 0

# Stops if there are no downloaded files.
log There is no new downloaded video.
exit 0
cya There is no new downloaded video.
}

# Moves result to local archive.
Expand Down

0 comments on commit 27d35fd

Please sign in to comment.