abuild: only update config.sub if needed

its only arm that needs it
This commit is contained in:
Timo Teräs 2013-07-29 14:10:38 +00:00 committed by Natanael Copa
parent e150a2515c
commit 21fb14d4e1
1 changed files with 3 additions and 5 deletions

View File

@ -573,16 +573,14 @@ 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 local changed=false
find . -name config.sub | while read f; do find . -name config.sub | while read f; do
local ver=$(./"$f" -t | tr -d '-') if ! ./$f armv6-alpine-linux-muslgnueabihf 2>/dev/null; then
if [ "$myver" -gt "$ver" ]; then msg "Updating $f"
msg "Updating $f ($myver > $ver)"
cp "$datadir"/${f##*/} "$f" || return 1 cp "$datadir"/${f##*/} "$f" || return 1
changed=true changed=true
else else
msg "Not updating newer $f" msg "Not new enough $f"
fi fi
# pipe subshell will return status of last command # pipe subshell will return status of last command
$changed $changed