abuild: only update config.sub if our version is newer
and exit with error if not
This commit is contained in:
parent
8f93ada4ac
commit
c07db665ec
13
abuild.in
13
abuild.in
@ -573,10 +573,21 @@ mkusers() {
|
|||||||
|
|
||||||
# helper to update config.sub to a recent version
|
# helper to update config.sub to a recent version
|
||||||
update_config_sub() {
|
update_config_sub() {
|
||||||
|
local myver=$("$datadir"/config.sub -t | tr -d '-')
|
||||||
|
local changed=false
|
||||||
find . -name config.sub | while read f; do
|
find . -name config.sub | while read f; do
|
||||||
msg "Replacing ${f##*/}"
|
local ver=$(./"$f" -t | tr -d '-')
|
||||||
|
if [ "$myver" -gt "$ver" ]; then
|
||||||
|
msg "Updating $f ($myver > $ver)"
|
||||||
cp "$datadir"/${f##*/} "$f" || return 1
|
cp "$datadir"/${f##*/} "$f" || return 1
|
||||||
|
changed=true
|
||||||
|
else
|
||||||
|
msg "Not updating newer $f"
|
||||||
|
fi
|
||||||
|
# pipe subshell will return status of last command
|
||||||
|
$changed
|
||||||
done
|
done
|
||||||
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
runpart() {
|
runpart() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user