summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-01 14:13:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-01 14:13:28 +0000
commitee9312c528a47e1170b975fc33167dbe35079b67 (patch)
tree3463ad7cd58c271376d199eb2dc72f4e086a64a6
parentd949ebc8589c3dc75d7888e34ce8f7faa4348469 (diff)
downloadalpine-conf-ee9312c528a47e1170b975fc33167dbe35079b67.zip
setup-apkrepos: minor cleanup. use $(( ... )) instead of `expr ...`
saves a fork
-rwxr-xr-xsetup-apkrepos.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index e6a51b4..8447e19 100755
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -48,7 +48,7 @@ prompt_setup_method() {
get_random_mirror() {
local i=0
local mirror_count=$(count $MIRRORS)
- local random_mirror_index=`expr $RANDOM % $mirror_count`
+ local random_mirror_index=$(( $RANDOM % $mirror_count ))
local random_mirror_hostname
echo -n "Picking random mirror... "
@@ -56,7 +56,7 @@ get_random_mirror() {
if [ $i -eq $random_mirror_index ]; then
break
fi
- i=`expr $i + 1`
+ i=$(( $i + 1 ))
done
echo "using $(get_hostname_from_url $mirror)"
@@ -201,7 +201,7 @@ prompt_alpine_release() {
i=1
for _release in $RELEASES; do
echo "$i) $_release"
- i=`expr $i + 1`
+ i=$(( $i + 1 ))
done
echo -n "Please select a release from the above list: "