From: paperbenni Date: Sat, 29 Feb 2020 23:28:42 +0000 (+0100) Subject: get that codacy coverage X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4b504f53eecc5c9d29496759abdf0dd3147fbec0;p=instantos%2FinstantOS.git get that codacy coverage --- diff --git a/README.md b/README.md index e5fdfa6..07328f6 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,4 @@ instantOS is a manjaro based distro that works out of the box but is still aimed Everything is lightning fast and works out of the box. -------- -### instantOS is still in early beta, contributions always welcome +## instantOS is still in early beta, contributions always welcome diff --git a/autostart.sh b/autostart.sh index fc1f52f..8d9a808 100755 --- a/autostart.sh +++ b/autostart.sh @@ -113,7 +113,7 @@ if [ -z "$ISLIVE" ]; then esac fi - cat /usr/share/instantwidgets/tooltips.txt | shuf | head -1 >~/.cache/tooltip + shuf /usr/share/instantwidgets/tooltips.txt | head -1 >~/.cache/tooltip conky -c /usr/share/instantwidgets/tooltips.conf & else diff --git a/depend.sh b/depend.sh index b69add0..e699938 100755 --- a/depend.sh +++ b/depend.sh @@ -2,7 +2,7 @@ # installs dependencies for instantOS -LINK="https://raw.githubusercontent.com/instantos/instantos/master" +export LINK="https://raw.githubusercontent.com/instantos/instantos/master" # install on arch based system pacinstall() { diff --git a/install.sh b/install.sh index aa6ff22..c79b3a1 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ fi RAW="https://raw.githubusercontent.com" -if cat /etc/os-release | grep -Eiq 'name.*(arch|manjaro)'; then +if grep -Eiq 'name.*(arch|manjaro)' /etc/os-release; then curl -s "$RAW/instantOS/instantLOGO/master/ascii.txt" echo "" else @@ -32,7 +32,7 @@ userrun() { curl -s "$1" >/tmp/instantinstall.sh chmod 777 /tmp/instantinstall.sh - if [ -n "$2" ] && getent passwd $2 && [ -e /home/$2 ]; then + if [ -n "$2" ] && getent passwd "$2" && [ -e /home/"$2" ]; then echo "single user installation for $1" sudo su "$2" -c /tmp/instantinstall.sh else diff --git a/monitor.sh b/monitor.sh index ee02096..dc18501 100755 --- a/monitor.sh +++ b/monitor.sh @@ -8,7 +8,7 @@ mkdir -p ~/instantos/monitor &>/dev/null cd ~/instantos/monitor xrandr | grep '[^s]connected' | grep -o '[0-9]*x[0-9]*+[0-9]*' | grep -o '[0-9]*$' >positions.txt -AMOUNT=$(cat positions.txt | wc -l) +AMOUNT=$(wc -l max.txt else - let PIXELS1="$(head -1 resolutions.txt | grep -o '^[0-9]*') * $(cat resolutions.txt | head -1 | grep -o '[0-9]*$')" - let PIXELS2="$(tail -1 resolutions.txt | grep -o '^[0-9]*') * $(cat resolutions.txt | head -1 | grep -o '[0-9]*$')" + let PIXELS1="$(head -1 resolutions.txt | grep -o '^[0-9]*') * $(head -1 resolutions.txt | grep -o '[0-9]*$')" + let PIXELS2="$(tail -1 resolutions.txt | grep -o '^[0-9]*') * $(head -1 resolutions.txt | grep -o '[0-9]*$')" if [ "$PIXELS1" -gt "$PIXELS2" ]; then head -1 resolutions.txt >max.txt else diff --git a/rootinstall.sh b/rootinstall.sh index cd66ffe..c405523 100755 --- a/rootinstall.sh +++ b/rootinstall.sh @@ -16,7 +16,7 @@ ugroup() { groupadd "$1" &>/dev/null for USER in $(ls /home/ | grep -v '+'); do if ! sudo su "$USER" -c groups | grep -Eq " $1|$1 "; then - sudo gpasswd -a $USER $1 + sudo gpasswd -a "$USER" "$1" fi done } diff --git a/status.sh b/status.sh index 198ef7f..50ed56c 100755 --- a/status.sh +++ b/status.sh @@ -32,7 +32,7 @@ while :; do else BATTERY="B"$(egrep -o '[0-9]*%' <<<"$TMPBAT") # make indicator red on low battery - if [ $(grep '[0-9]*' <<<$BATTERY) -lt 10 ]; then + if [ $(grep '[0-9]*' <<<"$BATTERY") -lt 10 ]; then BATTERY="^c#ff0000^$BATTERY^d^" fi fi