From e973c03c72d8380c7a083c979bad52e67ea51999 Mon Sep 17 00:00:00 2001
From: Santiago Lo Coco <santilococo.01@gmail.com>
Date: Mon, 3 Jan 2022 13:13:54 -0300
Subject: [PATCH] Update '/home/slococo/.oh-my-zsh' in .zshrc

---
 bootstrapsc.txt    |  92 ++++++++++++++++++++++
 commonsc.txt       | 186 +++++++++++++++++++++++++++++++++++++++++++++
 dotfiles/.zshrc    |   2 +-
 installsc.txt      |  62 +++++++++++++++
 linkfilessc.txt    | 139 +++++++++++++++++++++++++++++++++
 scripts/install.sh |   4 +-
 6 files changed, 483 insertions(+), 2 deletions(-)
 create mode 100644 bootstrapsc.txt
 create mode 100644 commonsc.txt
 create mode 100644 installsc.txt
 create mode 100644 linkfilessc.txt

diff --git a/bootstrapsc.txt b/bootstrapsc.txt
new file mode 100644
index 0000000..9508558
--- /dev/null
+++ b/bootstrapsc.txt
@@ -0,0 +1,92 @@
+
+In scripts/bootstrap.sh line 13:
+    local counter=0
+    ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
+
+
+In scripts/bootstrap.sh line 15:
+        if [ $((counter++)) -eq 1 ]; then
+                       ^-- SC3018 (warning): In POSIX sh, ++ is undefined.
+
+
+In scripts/bootstrap.sh line 40:
+    if [ $counter -eq 0 ]; then
+         ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    if [ "$counter" -eq 0 ]; then
+
+
+In scripts/bootstrap.sh line 66:
+    while [[ ! -d $gitWorkPath ]]; do
+          ^---------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/bootstrap.sh line 89:
+    commOuput=$(command -v ${comm} &> /dev/null)
+    ^-------^ SC2034 (warning): commOuput appears unused. Verify use (or export if used externally).
+                           ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
+                                   ^----------^ SC3020 (warning): In POSIX sh, &> is undefined.
+
+Did you mean: 
+    commOuput=$(command -v "${comm}" &> /dev/null)
+
+
+In scripts/bootstrap.sh line 92:
+        if [ -f "/etc/arch-release" ] || [ $unameOutput -eq 0 ]; then
+                                           ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+        if [ -f "/etc/arch-release" ] || [ "$unameOutput" -eq 0 ]; then
+
+
+In scripts/bootstrap.sh line 93:
+            sudo pacman --noconfirm --needed -Sy ${1} > /dev/null 2>&1
+                                                 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+            sudo pacman --noconfirm --needed -Sy "${1}" > /dev/null 2>&1
+
+
+In scripts/bootstrap.sh line 117:
+    cocoRiceFolder=$(echo "$(pwd -P)" | awk '{ sub(/CocoRice.*/, "CocoRice"); print }')
+                          ^---------^ SC2005 (style): Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
+
+
+In scripts/bootstrap.sh line 118:
+    cd $cocoRiceFolder
+    ^----------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
+       ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    cd "$cocoRiceFolder" || exit
+
+
+In scripts/bootstrap.sh line 120:
+    source scripts/common.sh
+    ^----------------------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.
+           ^---------------^ SC1091 (info): Not following: scripts/common.sh was not specified as input (see shellcheck -x).
+
+
+In scripts/bootstrap.sh line 121:
+    checkParameters $@
+                    ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements.
+
+
+In scripts/bootstrap.sh line 127:
+    cd $lastFolder
+    ^------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
+       ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    cd "$lastFolder" || exit
+
+
+In scripts/bootstrap.sh line 130:
+runScript $@
+          ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements.
+
+For more information:
+  https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
+  https://www.shellcheck.net/wiki/SC2034 -- commOuput appears unused. Verify ...
+  https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...
diff --git a/commonsc.txt b/commonsc.txt
new file mode 100644
index 0000000..57c9ce8
--- /dev/null
+++ b/commonsc.txt
@@ -0,0 +1,186 @@
+
+In scripts/common.sh line 27:
+    str="${@: -1}"; inputbox=false
+        ^--------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
+         ^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
+
+
+In scripts/common.sh line 31:
+            if [ $i -eq $((${argc}-1)) ]; then
+                           ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 36:
+            ((i++))
+            ^-----^ SC3006 (warning): In POSIX sh, standalone ((..)) is undefined.
+               ^-- SC3018 (warning): In POSIX sh, ++ is undefined.
+
+
+In scripts/common.sh line 42:
+        width=$((${width}+15))
+                 ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 43:
+        height=$((${height}+2))
+                  ^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 46:
+    if [ $found = false ]; then
+         ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    if [ "$found" = false ]; then
+
+
+In scripts/common.sh line 49:
+        dialog "${options[@]}"
+                ^-----------^ SC3054 (warning): In POSIX sh, array references are undefined.
+
+
+In scripts/common.sh line 54:
+    str="${@: -1}"; inputbox=false
+        ^--------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
+         ^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
+
+
+In scripts/common.sh line 58:
+            if [ $i -eq $((${argc}-1)) ]; then
+                           ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 63:
+            ((i++))
+            ^-----^ SC3006 (warning): In POSIX sh, standalone ((..)) is undefined.
+               ^-- SC3018 (warning): In POSIX sh, ++ is undefined.
+
+
+In scripts/common.sh line 69:
+        width=$((${width}+15))
+                 ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 72:
+    if [ $found = false ]; then
+         ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    if [ "$found" = false ]; then
+
+
+In scripts/common.sh line 76:
+        whiptail "${options[@]}"
+                  ^-----------^ SC3054 (warning): In POSIX sh, array references are undefined.
+
+
+In scripts/common.sh line 81:
+    options=(); found=false
+            ^-- SC3030 (warning): In POSIX sh, arrays are undefined.
+
+
+In scripts/common.sh line 84:
+            options+=("${height}")
+            ^-----^ SC3024 (warning): In POSIX sh, += is undefined.
+                     ^-----------^ SC3030 (warning): In POSIX sh, arrays are undefined.
+
+
+In scripts/common.sh line 85:
+            options+=("${width}")
+            ^-----^ SC3024 (warning): In POSIX sh, += is undefined.
+                     ^----------^ SC3030 (warning): In POSIX sh, arrays are undefined.
+
+
+In scripts/common.sh line 90:
+        options+=("${item}")
+        ^-----^ SC3024 (warning): In POSIX sh, += is undefined.
+                 ^---------^ SC3030 (warning): In POSIX sh, arrays are undefined.
+
+
+In scripts/common.sh line 97:
+    whiptail "${options[@]}"
+              ^-----------^ SC3054 (warning): In POSIX sh, array references are undefined.
+
+
+In scripts/common.sh line 103:
+    dialog "${options[@]}"
+            ^-----------^ SC3054 (warning): In POSIX sh, array references are undefined.
+
+
+In scripts/common.sh line 107:
+    width=$(echo "$1" | wc -c)
+            ^---------------^ SC2000 (style): See if you can use ${#variable} instead.
+
+
+In scripts/common.sh line 108:
+    echo $((${width}+8))
+            ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 113:
+    for (( i = 0; i < ${#str}; i++ )); do
+    ^-^ SC3005 (warning): In POSIX sh, arithmetic for loops are undefined.
+                                ^-- SC3018 (warning): In POSIX sh, ++ is undefined.
+
+
+In scripts/common.sh line 114:
+        if [ "${str:$i:1}" = '\' ] && [ "${str:$((i+1)):1}" = 'n' ]; then
+              ^---------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
+                              ^-- SC1003 (info): Want to escape a single quote? echo 'This is how it'\''s done'.
+                                         ^---------------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
+
+
+In scripts/common.sh line 121:
+        ((count++))
+        ^---------^ SC3006 (warning): In POSIX sh, standalone ((..)) is undefined.
+               ^-- SC3018 (warning): In POSIX sh, ++ is undefined.
+
+
+In scripts/common.sh line 125:
+        echo $(($count+8))
+                ^----^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 132:
+    newlines=$(printf "$1" | grep -c $'\n')
+                      ^--^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".
+                                     ^---^ SC3003 (warning): In POSIX sh, $'..' is undefined.
+
+
+In scripts/common.sh line 133:
+    chars=$(echo "$1" | wc -c)
+            ^---------------^ SC2000 (style): See if you can use ${#variable} instead.
+
+
+In scripts/common.sh line 138:
+    echo $((6+${height}))
+              ^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 142:
+    newlines=$(printf "$1" | grep -c $'\n')
+                      ^--^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".
+                                     ^---^ SC3003 (warning): In POSIX sh, $'..' is undefined.
+
+
+In scripts/common.sh line 143:
+    chars=$(echo "$1" | wc -c)
+            ^---------------^ SC2000 (style): See if you can use ${#variable} instead.
+
+
+In scripts/common.sh line 148:
+    echo $((4+${height}))
+              ^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
+
+
+In scripts/common.sh line 152:
+    export dialogBox=${1}
+                     ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    export dialogBox="${1}"
+
+For more information:
+  https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A...
+  https://www.shellcheck.net/wiki/SC3003 -- In POSIX sh, $'..' is undefined.
+  https://www.shellcheck.net/wiki/SC3005 -- In POSIX sh, arithmetic for loops...
diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc
index acd5dc9..3521b15 100644
--- a/dotfiles/.zshrc
+++ b/dotfiles/.zshrc
@@ -11,7 +11,7 @@ SAVEHIST=10000
 HISTFILE=~/.cache/zsh/.histfile
 
 # Path to your oh-my-zsh installation.
-export ZSH="/home/slococo/.oh-my-zsh"
+export ZSH="/usr/share/oh-my-zsh"
 
 #ZSH_THEME="pmcgee"
 ZSH_THEME="powerlevel10k/powerlevel10k"
diff --git a/installsc.txt b/installsc.txt
new file mode 100644
index 0000000..2b5d2ad
--- /dev/null
+++ b/installsc.txt
@@ -0,0 +1,62 @@
+
+In scripts/install.sh line 5:
+    git clone $2 > /dev/null 2>&1
+              ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    git clone "$2" > /dev/null 2>&1
+
+
+In scripts/install.sh line 6:
+    cd $1; sudo make install > /dev/null 2>&1; cd ..
+    ^---^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
+       ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
+                                               ^---^ SC2103 (info): Use a ( subshell ) to avoid having to cd back.
+
+Did you mean: 
+    cd "$1" || exit; sudo make install > /dev/null 2>&1; cd ..
+
+
+In scripts/install.sh line 11:
+    cd $DOTFILES_CONFIG
+    ^-----------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
+       ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    cd "$DOTFILES_CONFIG" || exit
+
+
+In scripts/install.sh line 13:
+    if [[ ! -d "dwmblocks" ]]; then
+       ^--------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/install.sh line 16:
+    if [[ ! -d "dwm" ]]; then
+       ^--------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/install.sh line 19:
+    if [[ ! -d "st" ]]; then
+       ^-------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/install.sh line 22:
+    if [[ ! -d "dmenu" ]]; then
+       ^----------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/install.sh line 25:
+    if [[ ! -d "clipmenu" ]]; then
+       ^-------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/install.sh line 31:
+    source scripts/common.sh
+    ^----------------------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.
+           ^---------------^ SC1091 (info): Not following: scripts/common.sh was not specified as input (see shellcheck -x).
+
+For more information:
+  https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...
+  https://www.shellcheck.net/wiki/SC3010 -- In POSIX sh, [[ ]] is undefined.
+  https://www.shellcheck.net/wiki/SC3046 -- In POSIX sh, 'source' in place of...
diff --git a/linkfilessc.txt b/linkfilessc.txt
new file mode 100644
index 0000000..b606e51
--- /dev/null
+++ b/linkfilessc.txt
@@ -0,0 +1,139 @@
+
+In scripts/linkFiles.sh line 8:
+    if [[ -f "$2" ]]; then
+       ^-----------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/linkFiles.sh line 9:
+        if [ "$skip_all" == "true" ]; then
+                         ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
+
+
+In scripts/linkFiles.sh line 11:
+        elif [ "$overwrite_all" == "true" ]; then
+                                ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
+
+
+In scripts/linkFiles.sh line 13:
+        elif [ "$backup_all" == "true" ]; then
+                             ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
+
+
+In scripts/linkFiles.sh line 22:
+            if [ $selectedOption -eq 1 ]; then
+                 ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+            if [ "$selectedOption" -eq 1 ]; then
+
+
+In scripts/linkFiles.sh line 24:
+            elif [ $selectedOption -eq 2 ]; then
+                   ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+            elif [ "$selectedOption" -eq 2 ]; then
+
+
+In scripts/linkFiles.sh line 27:
+            elif [ $selectedOption -eq 3 ]; then
+                   ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+            elif [ "$selectedOption" -eq 3 ]; then
+
+
+In scripts/linkFiles.sh line 29:
+            elif [ $selectedOption -eq 4 ]; then
+                   ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+            elif [ "$selectedOption" -eq 4 ]; then
+
+
+In scripts/linkFiles.sh line 32:
+            elif [ $selectedOption -eq 5 ]; then
+                   ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+            elif [ "$selectedOption" -eq 5 ]; then
+
+
+In scripts/linkFiles.sh line 54:
+    for srcFile in $(find -H "$DOTFILES" -not -path '*.git' -not -path '*.config*' -not -path '*.ssh*' -not -path '*.icons*' -not -path '*.local*' -not -path '*other*'); do
+                   ^-- SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop.
+
+
+In scripts/linkFiles.sh line 59:
+        if [[ -f "$srcFile" ]]; then
+           ^-----------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/linkFiles.sh line 65:
+        for srcFile in $(find -H "$initialFolder"); do
+                       ^-------------------------^ SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop.
+
+
+In scripts/linkFiles.sh line 66:
+            if [[ -d "$srcFile" ]]; then
+               ^-----------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/linkFiles.sh line 69:
+                if [[ ! -d "$HOME/$var" ]]; then
+                   ^---------------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/linkFiles.sh line 74:
+            if [[ -f "$srcFile" ]]; then
+               ^-----------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/linkFiles.sh line 91:
+    sudo bash -c "$(declare -f runDetachedScript); $(declare -f linkFile); "runDetachedScript" "$dialogBox""
+                    ^--------------------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.
+                                                     ^-----------------^ SC3044 (warning): In POSIX sh, 'declare' is undefined.
+                                                                            ^---------------^ SC2140 (warning): Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
+                                                                                                ^--------^ SC2027 (warning): The surrounding quotes actually unquote this. Remove or escape them.
+                                                                                                ^--------^ SC2154 (warning): dialogBox is referenced but not assigned.
+                                                                                                ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.
+
+Did you mean: 
+    sudo bash -c "$(declare -f runDetachedScript); $(declare -f linkFile); "runDetachedScript" ""$dialogBox"""
+
+
+In scripts/linkFiles.sh line 95:
+    source scripts/common.sh
+    ^----------------------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.
+           ^---------------^ SC1091 (info): Not following: scripts/common.sh was not specified as input (see shellcheck -x).
+
+
+In scripts/linkFiles.sh line 100:
+    for srcFile in $(find -H "$DOTFILES_OTHER"); do
+                   ^--------------------------^ SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop.
+
+
+In scripts/linkFiles.sh line 101:
+        if [[ -d "$srcFile" ]]; then
+           ^-----------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/linkFiles.sh line 104:
+            if [[ ! -d "/$var" ]]; then
+               ^----------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/linkFiles.sh line 109:
+        if [[ -f "$srcFile" ]]; then
+           ^-----------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.
+
+
+In scripts/linkFiles.sh line 117:
+    source scripts/common.sh
+    ^----------------------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.
+           ^---------------^ SC1091 (info): Not following: scripts/common.sh was not specified as input (see shellcheck -x).
+
+For more information:
+  https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u...
+  https://www.shellcheck.net/wiki/SC2044 -- For loops over find output are fr...
+  https://www.shellcheck.net/wiki/SC2140 -- Word is of the form "A"B"C" (B in...
diff --git a/scripts/install.sh b/scripts/install.sh
index d6bb38c..9c8ee0d 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -32,4 +32,6 @@ runScript() {
     downloadAndInstallPackages
 }
 
-runScript
+# runScript
+    source scripts/common.sh
+    displayDialogBox --infobox "Downloading 'dwmblocks'"