Skip to content

Commit

Permalink
lxc-debian: standardize formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
thrawn-sh authored and stgraber committed Jul 13, 2014
1 parent c267f3c commit 9292952
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions templates/lxc-debian.in
Expand Up @@ -416,12 +416,10 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi

current_release=`wget ${MIRROR}/dists/stable/Release -O - 2> /dev/null |\
head |awk '/^Codename: (.*)$/ { print $2; }'`
current_release=`wget ${MIRROR}/dists/stable/Release -O - 2> /dev/null | head |awk '/^Codename: (.*)$/ { print $2; }'`
release=${release:-${current_release}}
valid_releases=('squeeze' 'wheezy' 'jessie' 'sid')
if [[ ! "${valid_releases[*]}" =~ (^|[^[:alpha:]])$release([^[:alpha:]]|$) ]]
then
if [[ ! "${valid_releases[*]}" =~ (^|[^[:alpha:]])$release([^[:alpha:]]|$) ]]; then
echo "Invalid release ${release}, valid ones are: ${valid_releases[*]}"
exit 1
fi
Expand Down

0 comments on commit 9292952

Please sign in to comment.