Last active
October 23, 2019 22:29
-
-
Save dislogical/35b0898b24889862fa733d6e6e05eb30 to your computer and use it in GitHub Desktop.
AWS C Library Updater
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| repos=( | |
| s2n | |
| common | |
| checksums | |
| event-stream | |
| cal | |
| io | |
| compression | |
| auth | |
| http | |
| mqtt | |
| ) | |
| build_log=`pwd`/build_log.txt | |
| for path in ${repos[@]}; do | |
| pushd "$path" > /dev/null | |
| branch=`git rev-parse --abbrev-ref HEAD` | |
| echo "Pulling ${path} (${branch})" | |
| if ! git pull > /dev/null 2>&1; then | |
| echo "!!! Pulling branch ${branch} failed, switching to master" | |
| git checkout master > /dev/null 2>&1 | |
| git pull > /dev/null 2>&1 | |
| fi | |
| echo "Building ${path}" | |
| ninja -C build install > ${build_log} 2>&1 || (cat ${build_log} && exit 1) | |
| popd > /dev/null | |
| done | |
| rm -f ${build_log} | |
| echo "Update complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment