Fix linting issues in scripts
This commit is contained in:
parent
e3d5f15c00
commit
c4952aad8f
7 changed files with 17 additions and 13 deletions
|
|
@ -1,13 +1,15 @@
|
|||
#! /usr/bin/sh
|
||||
|
||||
ssid=$(nmcli --fields SSID,RATE,SIGNAL,BARS device wifi list | fuzzel --dmenu --width 40 | awk '{print $1}')
|
||||
retval=$?
|
||||
if [ -z "${ssid}" ]; then
|
||||
exit $?
|
||||
exit $retval
|
||||
fi
|
||||
|
||||
password=$(fuzzel --dmenu --password)
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $?
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
exit $retval
|
||||
fi
|
||||
|
||||
nmcli device wifi connect "${ssid}" password "${password}"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#! /usr/bin/sh
|
||||
|
||||
rebase_marker="$(git rev-parse --show-toplevel)/.git/rebase-merge/done"
|
||||
while [ -f ${rebase_marker} ]
|
||||
while [ -f "${rebase_marker}" ]
|
||||
do
|
||||
git sign
|
||||
git rebase --continue
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ backup () {
|
|||
|
||||
if "${HOME}/.local/bin/dirtree-changed" --directory "${directory}" --check-file "${TS_DIR}/${target}"
|
||||
then
|
||||
borg create --compression auto,lzma ::"${target}"-{now} "${directory}"
|
||||
borg create --compression auto,lzma ::"${target}"-\{now\} "${directory}"
|
||||
touch "${TS_DIR}/${target}"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,17 +5,17 @@ WATCHLIST=~/.local/share/package-alert/watchlist
|
|||
agg_results=""
|
||||
|
||||
if [ -f "${WATCHLIST}" ]; then
|
||||
for pattern in $(cat "${WATCHLIST}"); do
|
||||
while read -r pattern; do
|
||||
pat_results=$(apt-cache search --names-only "${pattern}")
|
||||
if [ ! -z "${pat_results}" ]; then
|
||||
if [ -n "${pat_results}" ]; then
|
||||
agg_results="${agg_results:+${agg_results}
|
||||
}Packages matching \"${pattern}\":
|
||||
${pat_results}
|
||||
"
|
||||
fi
|
||||
done
|
||||
done < "${WATCHLIST}"
|
||||
fi
|
||||
|
||||
if [ ! -z "${agg_results}" ]; then
|
||||
if [ -n "${agg_results}" ]; then
|
||||
printf '%s' "${agg_results}" | /usr/sbin/sendmail "${USER}"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ today=$(date +'%Y-%m-%d')
|
|||
now=$(date +'%H:%M:%S')
|
||||
hour=$(echo "${now}" | cut -d: -f1 -)
|
||||
minute=$(echo "${now}" | cut -d: -f2 -)
|
||||
if [ "${minute}" \< "30" ]; then
|
||||
if [ "${minute}" -lt 30 ]; then
|
||||
case "${hour}" in
|
||||
"00"|"12") clock_face="🕛";;
|
||||
"01"|"13") clock_face="🕐";;
|
||||
|
|
@ -84,4 +84,4 @@ case "${battery_state}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
echo ${recs} 🕹️${touchpad_active} 📆${today} ${clock_face}${now} ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%
|
||||
echo "${recs} 🕹️${touchpad_active} 📆${today} ${clock_face}${now} ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%"
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ ts() {
|
|||
}
|
||||
|
||||
screenshot_filename() {
|
||||
echo ~/Pictures/screenshots/screenshot-$(ts).png
|
||||
echo ~/Pictures/screenshots/screenshot-"$(ts)".png
|
||||
}
|
||||
|
||||
recording_filename() {
|
||||
echo ~/Pictures/screenshots/recording-$(ts).mp4
|
||||
echo ~/Pictures/screenshots/recording-"$(ts)".mp4
|
||||
}
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue