33-aptsetup: improve perl regex to work with backports and perl 5.14
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 33-aptsetup
index 10f5879..234bd1a 100755 (executable)
@@ -11,7 +11,7 @@ set -e
 # use snapshot.debian.org based on build date for release
 if ifclass RELEASE ; then
   set -u
-  perl -pi -e 'BEGIN { $d="'$(date +%Y%m%d)'"; } s#^(\s+)(deb.* )(.*://ftp.debian.org.*?)\s+(\w+)\s+(.*)$#$1$2http://snapshot.debian.org/archive/debian/$d/ $4 $5#' \
+  perl -pi -e 'BEGIN { $d="'$(date +%Y%m%d)'"; } s#^(\s+)(deb.* )(.*://ftp.debian.org.*?)\s+([a-z-]+)\s+(.*)$#$1$2http://snapshot.debian.org/archive/debian/$d/ $4 $5#' \
     "${target}/etc/apt/sources.list.d/debian.list"
 fi