diff options
author | Seppia <seppia@seppia.net> | 2018-06-03 15:04:01 +0200 |
---|---|---|
committer | Seppia <seppia@seppia.net> | 2018-06-03 15:04:01 +0200 |
commit | d5601dc59f9d75d630ba44ff569f273466d18c58 (patch) | |
tree | 34a2cf4e01e10d2cf2e4def645e22e826495478d | |
parent | 00eeed46627b15881b3ccc92336e32c5cc7fce72 (diff) | |
download | repofish-d5601dc59f9d75d630ba44ff569f273466d18c58.tar.gz repofish-d5601dc59f9d75d630ba44ff569f273466d18c58.tar.bz2 repofish-d5601dc59f9d75d630ba44ff569f273466d18c58.zip |
Functions names
Uniformed names of functions and minor fix.
-rwxr-xr-x | repo.sh | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -10,7 +10,7 @@ URL_PREFIX='https://aur.archlinux.org/' SEARCH_STR='rpc/?v=5&type=search&by=name-desc&arg=' -add_package() { +add_packages() { declare -a pkg=("${!1}") for i in "${pkg[@]}"; do if [ ! -d "${SRC_PATH}/$i" ]; then @@ -31,7 +31,7 @@ clone_package() { fi } -rm_package() { +rm_packages() { declare -a pkg=("${!1}") for i in "${pkg[@]}"; do if [ -d "${SRC_PATH}/$i" ]; then @@ -46,7 +46,7 @@ check_package() { if [ -d "${SRC_PATH}/$1" ]; then ${EDITOR} ${SRC_PATH}/$1/PKGBUILD else - echo 'WARNING: Package not found.' + echo 'WARNING: Package '"$1"' not found.' fi } @@ -123,7 +123,7 @@ update_packages() { fi } -install_package() { +install_packages() { declare -a pkg=("${!1}") for i in "${pkg[@]}"; do if [ -d "${SRC_PATH}/$i" ]; then @@ -220,7 +220,7 @@ elif [ "$1" == 'add' ]; then packages[$((N-2))]=${!N} let N=N+1 done - add_package packages[@] + add_packages packages[@] fi elif [ "$1" == 'clone' ]; then if [ "$3" != '' ]; then @@ -239,7 +239,7 @@ elif [ "$1" == 'rm' ]; then packages[$((N-2))]=${!N} let N=N+1 done - rm_package packages[@] + rm_packages packages[@] fi elif [ "$1" == 'check' ]; then if [ "$3" != '' ]; then @@ -314,7 +314,7 @@ elif [ "$1" == 'install' ]; then packages[$((N-2))]=${!N} let N=N+1 done - install_package packages[@] + install_packages packages[@] fi elif [ "$1" == 'clean' ]; then if [ "$2" != '' ]; then |