summarylogtreecommitdiffstats
path: root/aurbuild
diff options
context:
space:
mode:
authorVianney Bouchaud2023-10-03 21:35:00 +0200
committerVianney Bouchaud2023-10-03 21:35:00 +0200
commit8bb2631346c4c22e6a204dde1f39772f385d9f23 (patch)
tree6d4cc77bf34e9683f556c27ed2c7d91c4776aab0 /aurbuild
parent68cc2adc588faf543a8835d3ee48ef9411c85566 (diff)
downloadaurbuild.tar.gz
upgpkg: aurbuild 2.0.0-1
upstream release upgpkg: aurupdate 1.0.0-2 updating aurupdate and aurbuild to use git as configuration tool
Diffstat (limited to 'aurbuild')
-rwxr-xr-xaurbuild18
1 files changed, 11 insertions, 7 deletions
diff --git a/aurbuild b/aurbuild
index ac746b12eace..084a528b11c3 100755
--- a/aurbuild
+++ b/aurbuild
@@ -1,22 +1,25 @@
#!/usr/bin/env bash
-if [ -f ~/.avrbuild ]; then
- source ~/.avrbuild
-else
+if [ ! -f ~/.avr ]; then
echo "configuration file not found:"
- echo "$ cat ~/.avrbuild
-repository_name=avr
-repository_location=/foo/\$repository_name/\$(uname -m)
+ echo "$ cat ~/.avr
+[build]
+ repositoryName=avr
+ repositoryLocation=/foo/avr/x86_64
"
exit 1
fi
+function getconfig {
+ git config -f ~/.avr --get "$1"
+}
+
location="$(pwd)"
function released_version {
name=$1
- pacman -Ss $name | grep -e "^$repository_name/$name " | cut -d" " -f2
+ pacman -Ss $name | grep -e "^$(getconfig build.repositoryName)/$name " | cut -d" " -f2
}
current_arch=$(uname -m)
@@ -45,6 +48,7 @@ for name in $(find . -mindepth 1 -maxdepth 1 -type d -not -name "\.*"); do
fi
done
+repository_location=$(getconfig build.repositoryLocation)
failures=()
for package in ${packages[@]} ; do
cd "$location/$package"