update.sh: ensure sub-repo in dir roa/ is created if not exists
This commit is contained in:
parent
98ce68e163
commit
a2033470f8
14
update.sh
14
update.sh
|
@ -12,6 +12,16 @@ git -C ../registry/ checkout master --quiet
|
||||||
php roagen.php
|
php roagen.php
|
||||||
php rfc8416.php
|
php rfc8416.php
|
||||||
|
|
||||||
|
# Ensure sub-repo is created to track roa file udpates
|
||||||
|
if [ ! -d roa/ ] ; then mkdir roa ; fi
|
||||||
|
if [ ! -d roa/.git/ ] ; then
|
||||||
|
git -C roa/ init
|
||||||
|
if [ ! -f roa/README.md ; then
|
||||||
|
touch roa/README.md
|
||||||
|
echo '## roas' | tee roa/README.md ; fi
|
||||||
|
git -C roa/ commit --allow-empty -m "Initial commit"
|
||||||
|
git -C roa/ commit roa/README.md -m "Add README.md" ; fi
|
||||||
|
|
||||||
# Write out last commit to file
|
# Write out last commit to file
|
||||||
echo "## Notes
|
echo "## Notes
|
||||||
|
|
||||||
|
@ -31,8 +41,8 @@ $(git -C ../registry/ log -n 1)
|
||||||
\`\`\`" > roa/README.md
|
\`\`\`" > roa/README.md
|
||||||
|
|
||||||
# Commit latest version of ROA files
|
# Commit latest version of ROA files
|
||||||
git add roa/*
|
git -C roa/ add roa/*
|
||||||
git commit roa/* -m "Updated ROA files - $ISO_DATE" --quiet
|
git -C roa/ commit roa/* -m "Updated ROA files - $ISO_DATE" --quiet
|
||||||
|
|
||||||
# Push repository to every remote configured
|
# Push repository to every remote configured
|
||||||
for REMOTE in $(git remote | egrep -v upstream | paste -sd " " -) ; do git push $REMOTE master:master --quiet ; done
|
for REMOTE in $(git remote | egrep -v upstream | paste -sd " " -) ; do git push $REMOTE master:master --quiet ; done
|
||||||
|
|
Loading…
Reference in a new issue