aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2010-01-31 15:54:38 -0500
committerDave Reisner <d@falconindy.com>2010-01-31 15:54:38 -0500
commitcd19b9ef21328a7667af6268cf72557e0080348e (patch)
treec70900f8247d3faeec49abafc7d36f414e149834
parentdce59c2ec78a194dbc37805eba2f69d479c040ea (diff)
downloadsquashfu-cd19b9ef21328a7667af6268cf72557e0080348e.tar.gz
Drop deprecated 0 syntax in favor of 0
-rwxr-xr-xsquashfu10
1 files changed, 5 insertions, 5 deletions
diff --git a/squashfu b/squashfu
index 5d20085..4758a86 100755
--- a/squashfu
+++ b/squashfu
@@ -166,7 +166,7 @@ check_for_resquash () {
debug "Found $number_of_bins bins"
if [[ $number_of_bins -gt $MAX_BINS ]]; then
- return $[ $number_of_bins - $MIN_BINS ]
+ return $(( $number_of_bins - $MIN_BINS ))
else
return 0
fi
@@ -175,7 +175,7 @@ check_for_resquash () {
get_next_available_bin () {
# Arguments: none
# Returns: Numeric value of the next unused bin
- next_bin=$[ $(cut -d: -f1 "$BINVENTORY" | sort -n | tail -1) + 1 ]
+ next_bin=$(( $(cut -d: -f1 "$BINVENTORY" | sort -n | tail -1) + 1 ))
debug "Next available bin = $next_bin"
return $next_bin
}
@@ -195,7 +195,7 @@ sweep_bins () {
mv "${BINS_DIR}/$high_bin" "${BINS_DIR}/$count"
sed -i "/^$high_bin:/s/^$high_bin:/$count:/" "$BINVENTORY"
fi
- count=$[ $count + 1 ]
+ count=$(( $count + 1 ))
done
}
@@ -334,7 +334,7 @@ action_rollback () {
die "Cannot rollback more than ${#bin_list[@]} backups"
fi
- local num_to_mount=$[ ${#bin_list[@]} - $1 ]
+ local num_to_mount=$(( ${#bin_list[@]} - $1 ))
mountpoint "$UNION_MOUNT" &>/dev/null && unmount_union
mountpoint "$SQUASH_MOUNT" &>/dev/null || mount_squash
@@ -389,7 +389,7 @@ action_resquash_now () {
if [[ $number_of_bins -le $MIN_BINS ]]; then
die "Nothing to do. Current backups do not exceed MIN_BINS value."
else
- create_new_squash $[ $number_of_bins - $MIN_BINS ]
+ create_new_squash $(( $number_of_bins - $MIN_BINS ))
fi
exit $?