Rewrite scripts and fix more build issues

This commit is contained in:
Sotr
2020-04-13 01:20:55 +07:00
parent 6f32d02a63
commit 7aa8eb6363
29 changed files with 930 additions and 390 deletions

30
scripts/commitUpstream.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
echo "[Akarin] State: Commit Upstream"
(
set -e
function changeLog() {
base=$(git ls-tree HEAD $1 | cut -d' ' -f3 | cut -f1)
cd $1 && git log --oneline ${base}...HEAD
}
paper=$(changeLog Paper)
updated=""
logsuffix=""
if [ ! -z "$paper" ]; then
logsuffix="$logsuffix\n\nPaper Changes:\n$paper"
if [ -z "$updated" ]; then updated="Paper"; else updated="$updated/Paper"; fi
fi
disclaimer="Upstream has released updates that appears to apply and compile correctly"
if [ ! -z "$1" ]; then
disclaimer="$@"
fi
log="Updated Upstream ($updated)\n\n${disclaimer}${logsuffix}"
echo -e "$log" | git commit -F -
) || exit 1