Skip to content

Instantly share code, notes, and snippets.

@kenmoini
Created September 29, 2018 19:39
Show Gist options
  • Save kenmoini/0c7f2406b9f86fd33c473538d4701536 to your computer and use it in GitHub Desktop.
Save kenmoini/0c7f2406b9f86fd33c473538d4701536 to your computer and use it in GitHub Desktop.
Sync all Satellite Repos via hammer CLI
#!/bin/bash
#Syncs all the repos for a given organization-id
SAT_ORG_ID=1
while read f line; do
for X in $line
do
hammer repository synchronize --async --organization-id 1 --id $X
done
done <<< $(hammer repository list --organization-id $SAT_ORG_ID | sed -ne 's/ * |.*//p')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment