From 0c8061338573e6cf1e62db6a11b2a050bcf47920 Mon Sep 17 00:00:00 2001 From: Marco Neumann Date: Fri, 1 Jul 2016 17:33:22 -0700 Subject: [PATCH] servo: Merge #12020 - Add shebang to Linux runservo.sh (from crepererum:fix/shebang); r=aneeshusa Shebang is missing and therefore `./runservo.sh` does not work under some environments. I've chosen to use `/usr/bin/env sh` instead of `/bin/sh` or `/usr/bin/sh` to auto-select the right `sh` executable depending on the environment. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because it does not affect servo itself but rather the resulting package under some environments. Source-Repo: https://github.com/servo/servo Source-Revision: 1ed06777ee1e69c8b56715c897a5bd66ad9e235e --- servo/python/servo/package_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servo/python/servo/package_commands.py b/servo/python/servo/package_commands.py index 6569598189fb..64f3ee69551e 100644 --- a/servo/python/servo/package_commands.py +++ b/servo/python/servo/package_commands.py @@ -177,7 +177,7 @@ class PackageCommands(CommandBase): path.join('./build/' + browserhtml_path.split('/')[-1], 'out', 'index.html')] runservo = os.open(dir_to_package + '/runservo.sh', os.O_WRONLY | os.O_CREAT, int("0755", 8)) - os.write(runservo, "./servo " + ' '.join(servo_args)) + os.write(runservo, "#!/usr/bin/env sh\n./servo " + ' '.join(servo_args)) os.close(runservo) print("Creating tarball") tar_path = '/'.join(dir_to_package.split('/')[:-1]) + '/'