From 2f27db6afe1e6acbdc9ae16a7bddbd010c51b1d2 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sun, 14 May 2023 16:02:54 +0200 Subject: [PATCH] Erreurs ShellCheck --- bin/convertofut | 3 ++- bin/{secondscreenctl => secondscreen} | 2 +- bin/sshot-file | 5 +---- bin/updateall | 1 + bin/vncctl | 1 + bin/waybar | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename bin/{secondscreenctl => secondscreen} (97%) diff --git a/bin/convertofut b/bin/convertofut index df857f8..28fa514 100755 --- a/bin/convertofut +++ b/bin/convertofut @@ -39,9 +39,10 @@ for file in **/*".${format_in}"; do while [ "$(jobs -p | wc -l)" -ge 10 ]; do sleep 1 done - echo "$(basename "$file")" + basename "$file" output_file="${output}/$(dirname "$file")/$(basename "${file}" ".${format_in}").${format_out}" mkdir -p "$(dirname "${output_file}")" + # shellcheck disable=SC2086 ffmpeg -loglevel quiet -i "$file" $options "$output_file" & done diff --git a/bin/secondscreenctl b/bin/secondscreen similarity index 97% rename from bin/secondscreenctl rename to bin/secondscreen index db0d256..0e1196c 100755 --- a/bin/secondscreenctl +++ b/bin/secondscreen @@ -58,7 +58,7 @@ create() { fi if ! vnc_running; then - screen -d -m wayvnc -o "$vscreen_name" 0.0.0.0 + screen -d -m wayvnc -o "$vscreen_name" "$listen_address" fi } diff --git a/bin/sshot-file b/bin/sshot-file index 66cd635..dbf517b 100755 --- a/bin/sshot-file +++ b/bin/sshot-file @@ -1,6 +1,3 @@ #!/bin/sh -exec printf \ - "$@" - "screenshot-%s.${1:-png}" \ - "$(date +"%Y_%m_%d-%N")" +exec printf "$@" "screenshot-%s.${1:-png}" "$(date +"%Y_%m_%d-%N")" diff --git a/bin/updateall b/bin/updateall index dbd3ae9..d358231 100755 --- a/bin/updateall +++ b/bin/updateall @@ -22,6 +22,7 @@ function separator { # Loop for pm in "${commands_d}/"*; do separator "$(basename "$pm")" + # shellcheck source=/dev/null source "$pm" done diff --git a/bin/vncctl b/bin/vncctl index 64a9c5a..2ea4362 100755 --- a/bin/vncctl +++ b/bin/vncctl @@ -1,4 +1,5 @@ #!/bin/sh +# shellcheck disable=SC2317 # cd to the local VNC directory, exit if it fails cd "${HOME}/.vnc" || exit 5 diff --git a/bin/waybar b/bin/waybar index f0c7b3c..d78365a 100755 --- a/bin/waybar +++ b/bin/waybar @@ -1,4 +1,4 @@ -#!/bin/sh -x +#!/bin/bash -x # Waybar wrapper to reload it anytime the # configuration is edited