summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrepo.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/repo.sh b/repo.sh
index 3573b0e..0003ddb 100755
--- a/repo.sh
+++ b/repo.sh
@@ -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() {