Last active
May 27, 2021 20:31
-
-
Save jeremyd2019/383afd81e5ae28fe598a20960c88caff to your computer and use it in GitHub Desktop.
scripts for updating clangarm64 repos
This file contains 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 | |
shopt -s nullglob extglob | |
cd packages | |
# work around github issue with ~ in file name (turns into .) | |
for a in *~*; do | |
mv "$a" "`tr '~' '.' <<<"$a"`" | |
done | |
for u in https://github.com/msys2/CLANG-packages/releases/download/bootstrap-stage3-clangarm64/clangarm64.{db,db.tar.xz,files,files.tar.xz}{,.sig}; do | |
curl -LO $u | |
done | |
repo-add -v clangarm64.db.tar.xz *.pkg.tar.!(*.sig) |
This file contains 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
setlocal | |
set SIGNWITHKEY=-u "jeremy@drastrom.science" | |
FOR %%i IN (packages\*.pkg.tar.*) DO IF "%%~xi" neq ".sig" IF NOT EXIST "%%i.sig" gpg --detach-sign --no-armor %SIGNWITHKEY% "%%i" | |
CALL "D:\t\msys32\msys2_shell.cmd" -defterm -no-start -msys2 -here -c "./repoup.sh" | |
FOR %%i IN (packages\*.db packages\*.files) DO ( | |
gpg --detach-sign --no-armor --batch --yes %SIGNWITHKEY% "%%i" | |
COPY /Y "%%i.sig" "%%i.tar.xz.sig" | |
) |
This file contains 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 -x | |
gh release upload -R msys2/CLANG-packages --clobber bootstrap-stage3-clangarm64 packages/* | |
release_id="$(gh api repos/msys2/CLANG-packages/releases -q '.[] | select(.name=="bootstrap-stage3-clangarm64").id')" | |
body="$(gh api repos/msys2/CLANG-packages/releases/${release_id} -q '.body')" | |
sed -e 's|\(msys2/MINGW-packages\)@[[:xdigit:]]\+|\1@'$1'|' <<<"$body" | gh api --silent -X PATCH "repos/msys2/CLANG-packages/releases/${release_id}" -F body=@- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment