summaryrefslogtreecommitdiff
path: root/fix-shebang
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-03-12 12:59:03 +0000
committerLars Wirzenius <liw@liw.fi>2011-03-12 12:59:03 +0000
commit6befd5cc154800c0c78cdc4cfcfeaeea5a1b725a (patch)
treec7a3ad1154fd91bd30489b26bbf4ac3b45fb8ad1 /fix-shebang
parent1d86981cd7c1a00acced61c01afc536810f5aada (diff)
downloadextrautils-6befd5cc154800c0c78cdc4cfcfeaeea5a1b725a.tar.gz
Make fix-shebang require --shebang option to be used.
Diffstat (limited to 'fix-shebang')
-rwxr-xr-xfix-shebang2
1 files changed, 2 insertions, 0 deletions
diff --git a/fix-shebang b/fix-shebang
index b3b9844..ee1756d 100755
--- a/fix-shebang
+++ b/fix-shebang
@@ -30,6 +30,8 @@ class FixShebang(cliapp.Application):
name = self.create_tempfile_for(arg)
temp = open(name, 'w')
shebang = self.settings['shebang']
+ if not shebang:
+ raise Exception('You must specify an interpreter with --shebang')
if not shebang.startswith('#!'):
shebang = '#!%s' % shebang
temp.write('%s\n' % shebang)