diff options
-rwxr-xr-x | repo.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -7,7 +7,7 @@ #REPO_NAME='repo_name' add_package() { - if [ ! -d "${SRC_PATH}/$(echo $1 | cut -d '/' -f 4 | cut -d '.' -f 1)" ]; then + if [ ! -d "${SRC_PATH}/$(echo $1 | awk -F '/' '{print $NF}' | cut -d '.' -f 1)" ]; then cd ${SRC_PATH} git clone $1 else @@ -32,7 +32,7 @@ check_package() { } list_packages() { - find ${SRC_PATH}/* -type d -prune | cut -d '/' -f5 + find ${SRC_PATH}/* -type d -prune | awk -F '/' '{print $NF}' } clean_packages() { |