summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeppia <seppia@seppia.net>2018-05-30 01:15:06 +0200
committerSeppia <seppia@seppia.net>2018-05-30 01:15:06 +0200
commit643050c24c76f20ea7eaa76c57e52d285b217a14 (patch)
treec9c89373d95388976f1aa2db47ab61f04ac9763e
parent539bb576360fcdc38e0e579fee9bc2239e2f64a6 (diff)
downloadrepofish-643050c24c76f20ea7eaa76c57e52d285b217a14.tar.gz
repofish-643050c24c76f20ea7eaa76c57e52d285b217a14.tar.bz2
repofish-643050c24c76f20ea7eaa76c57e52d285b217a14.zip
Path parsing fix
Changes method for parsing list path and url using awk, opposed to previous hardcoded separator usage.
-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() {