diff options
author | Seppia <seppia@seppia.net> | 2018-05-30 01:15:06 +0200 |
---|---|---|
committer | Seppia <seppia@seppia.net> | 2018-05-30 01:15:06 +0200 |
commit | 643050c24c76f20ea7eaa76c57e52d285b217a14 (patch) | |
tree | c9c89373d95388976f1aa2db47ab61f04ac9763e | |
parent | 539bb576360fcdc38e0e579fee9bc2239e2f64a6 (diff) | |
download | repofish-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-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() { |