Fix bash shebang and recognise bash scripts as editable shell scripts when converting to deb. Closes: #532330 (Thanks, Bruce Stephens)

This commit is contained in:
Joey Hess
2009-06-08 13:22:30 -04:00
parent cbf330f982
commit 5b605e1960
3 changed files with 5 additions and 2 deletions

View File

@@ -497,7 +497,7 @@ sub _script_helper {
$value="#!/bin/bash\n$prefixcode$value";
}
else {
$value=~s@^#!\s*/bin/sh(\s)@#/bin/bash$1@;
$value=~s@^#!\s*/bin/sh(\s)@#!/bin/bash$1@;
$value=~s/\n/\n$prefixcode/s;
}
$this->{$script} = $value;