X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=scripts%2Fdebian%2Fbyhand-di;h=f8e5f6ba4d5796e975c092db795fa3aa6a38bdbb;hb=fd2177afc5c786b2e1bf51671aa4ca9d53671982;hp=9e1b0512d0934201e1dca39dcfb9857b85cdb07f;hpb=d4633de110db08057b892b8ee902dcbe4c942a1c;p=dak.git diff --git a/scripts/debian/byhand-di b/scripts/debian/byhand-di index 9e1b0512..f8e5f6ba 100755 --- a/scripts/debian/byhand-di +++ b/scripts/debian/byhand-di @@ -19,8 +19,8 @@ error() { } # Check validity of version number -# Expected are: YYYYMMDD, YYYYMMDD.x, YYYYMMDDx and the +b[0-9] on the end -if ! echo "$VERSION" | grep -Eq "^[0-9]{8}(|(\.|[a-z]+)[0-9]+)(\+b[0-9])?$"; then +# Expected are: YYYYMMDD, YYYYMMDD.x, YYYYMMDDx, YYYYMMDD+x and the +b[0-9] on the end +if ! echo "$VERSION" | grep -Eq "^[0-9]{8}(|(\.|\+?[a-z]+)[0-9]+)(\+b[0-9])?$"; then error "Invalid version: '$VERSION'" fi @@ -54,7 +54,8 @@ if [ -d "$TARGET/$VERSION" ]; then fi # We know the VERSION is sane by here, we just need to make sure we escape the + in +b1 (if any) -VERSIONREGEXP="$(echo $VERSION | sed 's@+@\\\+@')" +# It needs 'g' as well as we may have +$DIST+b[0-9] +VERSIONREGEXP="$(echo $VERSION | sed 's@+@\\\+@g')" # We know all data to be in ./installer-/; see if there's # anything else in the tarball except that and the 'current' symlink