diff options
author | Yash Karandikar | 2020-03-13 09:19:14 -0500 |
---|---|---|
committer | Yash Karandikar | 2020-03-13 09:19:14 -0500 |
commit | 63130c828b80c4f54a35af4c286a5f1c8a6c1438 (patch) | |
tree | 1523856a229bc723bc60ea797080964fa9bbef2b | |
parent | 542b71c06620a7cd31900660708fda77723f6c22 (diff) | |
parent | d2a07bc3277175cdeac6943b812ffb9276af57f0 (diff) | |
download | aur-63130c828b80c4f54a35af4c286a5f1c8a6c1438.tar.gz |
Correct files with shellcheck
-rw-r--r-- | PKGBUILD | 4 | ||||
-rwxr-xr-x | haur | 51 | ||||
-rw-r--r-- | haurrc | 4 |
3 files changed, 30 insertions, 29 deletions
@@ -16,6 +16,6 @@ prepare () { package () { make install srcdir=$srcdir pkgdir=$pkgdir } -md5sums=('dcc8ccfc2075b2b466ef1c6ae4a142db' - 'c075ed440b2e5c769603cd812f404c4e' +md5sums=('08a341e02b1980856f33cda0f86cf6e9' + '2c9bb36e3d797a6a3462bf69b6033cfe' 'c1051c8c4fe078e1f90b1ff0278f6a8d') @@ -1,7 +1,8 @@ #!/usr/bin/env bash -if [ -f $HOME/.config/haurrc ]; then - source $HOME/.config/haurrc +if [ -f "$HOME"/.config/haurrc ]; then + # shellcheck source=src/.config/haurrc + source "$HOME"/.config/haurrc else if [ -f /etc/haurrc ]; then source /etc/haurrc @@ -18,18 +19,18 @@ if [ ! $HAUR_NO_COLORS == "y" ]; then ncolors=$(tput colors 2>/dev/null) if test -n "$ncolors" && test $ncolors -ge 8; then - bold="$(tput bold 2>/dev/null)" - underline="$(tput smul 2>/dev/null)" - standout="$(tput smso 2>/dev/null)" + # bold="$(tput bold 2>/dev/null)" + # underline="$(tput smul 2>/dev/null)" + # standout="$(tput smso 2>/dev/null)" normal="$(tput sgr0 2>/dev/null)" - black="$(tput setaf 0 2>/dev/null)" + # black="$(tput setaf 0 2>/dev/null)" red="$(tput setaf 1 2>/dev/null)" - green="$(tput setaf 2 2>/dev/null)" - yellow="$(tput setaf 3 2>/dev/null)" + # green="$(tput setaf 2 2>/dev/null)" + # yellow="$(tput setaf 3 2>/dev/null)" blue="$(tput setaf 4 2>/dev/null)" - magenta="$(tput setaf 5 2>/dev/null)" - cyan="$(tput setaf 6 2>/dev/null)" - white="$(tput setaf 7 2>/dev/null)" + # magenta="$(tput setaf 5 2>/dev/null)" + # cyan="$(tput setaf 6 2>/dev/null)" + # white="$(tput setaf 7 2>/dev/null)" fi fi fi @@ -41,20 +42,20 @@ UPDATE=false for arg in "$@"; do shift case "$arg" in - "--update") set -- "$@" "-u" ;; + "--update") set -- "$@" "-u" ;; "--remove") set -- "$@" "-r" ;; "--clear-cache") set -- "$@" "-c" ;; - "--help") set -- "$@" "-h" ;; + "--help") set -- "$@" "-h" ;; "--"*) echo "Invalid Option: ${arg}" ; exit 1 ;; - *) set -- "$@" "$arg" + *) set -- "$@" "$arg" esac done shift $((OPTIND -1)) while getopts ":urch" opt; do case $opt in - u ) - $UPDATE=true + u ) + UPDATE=true ;; r ) REMOVE=true @@ -97,15 +98,15 @@ if [ $REMOVE == true ]; then fi fi elif [ $UPDATE == true ]; then - for PACKAGE_NAME in "$@"; do - echo "${blue}Updating $PACKAGE_NAME...${normal}" - cd ~/.haur - cd $PACKAGE_NAME - git pull origin master - rm -rf pkg src - rm -f *.pkg.tar.gz - makepkg -si - done + for PACKAGE_NAME in "$@"; do + echo "${blue}Updating $PACKAGE_NAME...${normal}" + cd ~/.haur + cd $PACKAGE_NAME + git pull origin master + rm -rf pkg src + rm -f *.pkg.tar.gz + makepkg -si + done if [ $CLEAR_CACHE == true ]; then if test -f "$HOME/.haur_cache"; then echo "${blue}Clearing cache...${normal}" @@ -1,4 +1,4 @@ #!/usr/bin/env bash -HAUR_ALWAYS_CLEAR_CACHE="n" -HAUR_NO_COLORS="n" +export HAUR_ALWAYS_CLEAR_CACHE="n" +export HAUR_NO_COLORS="n" |