servo: Merge #12020 - Add shebang to Linux runservo.sh (from crepererum:fix/shebang); r=aneeshusa

<!-- Please describe your changes on the following line: -->
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.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] These changes do not require tests because it does not affect servo itself but rather the resulting package under some environments.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1ed06777ee1e69c8b56715c897a5bd66ad9e235e
This commit is contained in:
Marco Neumann 2016-07-01 17:33:22 -07:00
Родитель aac2f5630a
Коммит 0c80613385
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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]) + '/'