mkbuild.sh

-shellcheck script
This commit is contained in:
2022-08-05 10:40:29 +02:00
parent 7a5cd20024
commit 240d5457ef

View File

@@ -1,12 +1,12 @@
#!/usr/local/bin/bash #!/usr/local/bin/bash
italic="\033[3m" #italic="\033[3m"
underline="\033[4m" #underline="\033[4m"
ita_under="\033[3;4m" #ita_under="\033[3;4m"
bgd="\033[1;4;31m" #bgd="\033[1;4;31m"
red="\033[1;31m" red="\033[1;31m"
bold="\033[1m" bold="\033[1m"
box="\033[1;41m" #box="\033[1;41m"
reset="\033[0m" reset="\033[0m"
if [ "$1" == "-h" ]; then if [ "$1" == "-h" ]; then
@@ -65,7 +65,7 @@ notification() {
#path_img=`dirname "$0"` #path_img=`dirname "$0"`
path_img=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) path_img=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ $3 -eq 0 ]; if [ "$3" -eq 0 ];
then then
sound="Glass" sound="Glass"
message="Envoi terminé sur $2 !" message="Envoi terminé sur $2 !"
@@ -80,14 +80,13 @@ notification() {
if [[ "$OSTYPE" == "linux-gnu" ]] && [ -x "$(command -v zenity)" ]; then if [[ "$OSTYPE" == "linux-gnu" ]] && [ -x "$(command -v zenity)" ]; then
zenity --title="$1" --notification --text="$message" zenity --title="$1" --notification --text="$message"
elif [[ "$OSTYPE" == "darwin"* ]] && [ -x "$(command -v terminal-notifier)" ]; then elif [[ "$OSTYPE" == "darwin"* ]] && [ -x "$(command -v terminal-notifier)" ]; then
#terminal-notifier -title "$1" -message "$message" -sound "$sound" -contentImage "$image" terminal-notifier -title "$1" -message "$message" -sound "$sound" -contentImage "$image"
terminal-notifier -title "$1" -message "$message" -sound "$sound" -appIcon "$image" #terminal-notifier -title "$1" -message "$message" -sound "$sound" -appIcon "$image"
fi fi
} }
cd $project_dir || exit cd "$project_dir" || exit
#mkdocs build --clean mkdocs build --clean
: <<'END_COMMENT' : <<'END_COMMENT'
if [[ "$device" == "airbook" ]]; then if [[ "$device" == "airbook" ]]; then