mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
cleanup: let conversion to including devid and change in devid happen at different rates
This commit is contained in:
parent
5d49b9b5d6
commit
9169659c80
1 changed files with 9 additions and 6 deletions
|
@ -433,15 +433,18 @@ update_ldevid() {
|
||||||
KEY=$1
|
KEY=$1
|
||||||
HELP="$(${APPS[$KEY]} --help 2>&1 || /bin/true)"
|
HELP="$(${APPS[$KEY]} --help 2>&1 || /bin/true)"
|
||||||
if echo $HELP | grep -q '\-\-ldevid'; then
|
if echo $HELP | grep -q '\-\-ldevid'; then
|
||||||
if [ $((RANDOM % 100)) -lt 33 ]; then
|
RNUM=$((RANDOM % 100))
|
||||||
CMD="${ARGS_DEVID[$KEY]}"
|
CMD="${ARGS_DEVID[$KEY]}"
|
||||||
if [ -z "$CMD" ]; then # upgrade or first run
|
if [ -z "$CMD" ]; then
|
||||||
|
if [ $RNUM -lt 30 ]; then # upgrade or first run
|
||||||
CMD="--ldevid LINUX_TEST_$(printf %.5d ${KEY})_"
|
CMD="--ldevid LINUX_TEST_$(printf %.5d ${KEY})_"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
|
if [ $RNUM -lt 10 ]; then
|
||||||
CMD="${CMD}x" # give it a new local ID
|
CMD="${CMD}x" # give it a new local ID
|
||||||
fi
|
fi
|
||||||
ARGS_DEVID[$KEY]="$CMD"
|
|
||||||
fi
|
fi
|
||||||
|
ARGS_DEVID[$KEY]="$CMD"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue