diff options
| author | mobinmob <mobinmob@disroot.org> | 2024-08-23 18:12:48 +0300 |
|---|---|---|
| committer | mobinmob <mobinmob@disroot.org> | 2024-08-23 18:12:48 +0300 |
| commit | a9107929029a5dac1a40b18cae397720fa7f3f4a (patch) | |
| tree | e3735c92ecb57e12453d5dd3568094d3026bd47b | |
| parent | f0443679ae1a19659cea3e6765395328cb08da0a (diff) | |
| download | autils-a9107929029a5dac1a40b18cae397720fa7f3f4a.tar.gz autils-a9107929029a5dac1a40b18cae397720fa7f3f4a.zip | |
apkg-reposync: fix syncing twice, also minor presentation fix.
| -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" |