diff options
Diffstat (limited to 'apkg-reposync')
| -rwxr-xr-x | apkg-reposync | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apkg-reposync b/apkg-reposync index 3507486..e1e14e3 100755 --- a/apkg-reposync +++ b/apkg-reposync @@ -42,7 +42,7 @@ sync_official() { find_default_remote "$dir_for_official_repo" find_current_branch "$dir_for_official_repo" git pull "$default_remote" "$current_branch" || die "Cannot pull from $default_remote/$current_branch for the ofixial repos" - if git pull "$default_remote" "$current_branch"; then printf "%s\n" "[~> Successfully synced the <official> repo!]"; fi + [ "$?" = 0 ] && printf "%s\n" "[~> Successfully synced the <official> repo!]" } sync_or_skip() { @@ -53,12 +53,12 @@ sync_or_skip() { find_default_remote "$r" find_current_branch "$r" git pull "$default_remote" "$current_branch" || die "Cannot pull from $default_remote/$current_branch" - else - printf "%s\n" "Repo in <$r> is not a git repo, skipping..." + else + printf "%s\n" "[~>Repo in <$r> is not a git repo, skipping...]" fi done } source_and_sanity_checks sync_official sync_or_skip -if sync_or_skip; then echo "[~> Repo(s) succesfully synced!]" && rm -f "temp_repos_file"; fi +[ "$?" = 0 ] && echo "[~> Repo(s) succesfully synced!]" && rm -f "temp_repos_file" |