Use portable shebangs in wrapper scripts (#79)

This is the recommended approach and it's necessary on systems like NixOS.

See: https://web.archive.org/web/20220617225709/https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my
This commit is contained in:
izzues
2022-06-22 14:37:10 -03:00
committed by GitHub
parent fd7bd09bda
commit 0b3d593bfd
14 changed files with 17 additions and 17 deletions

View File

@@ -219,8 +219,8 @@ COPY curl_ff* out/
COPY curl_chrome* curl_edge* curl_safari* out/ COPY curl_chrome* curl_edge* curl_safari* out/
{{/chrome}} {{/chrome}}
{{#alpine}} {{#alpine}}
# Replace /bin/bash with /bin/ash # Replace /usr/bin/env bash with /usr/bin/env ash
RUN sed -i 's@/bin/bash@/bin/ash@' out/curl_* RUN sed -i 's@/usr/bin/env bash@/usr/bin/env ash@' out/curl_*
{{/alpine}} {{/alpine}}
RUN chmod +x out/curl_* RUN chmod +x out/curl_*
{{#alpine}} {{#alpine}}

View File

@@ -130,8 +130,8 @@ RUN ! (ldd ./out/curl-impersonate | grep -q -e nghttp2 -e brotli -e ssl -e crypt
# Wrapper scripts # Wrapper scripts
COPY curl_chrome* curl_edge* curl_safari* out/ COPY curl_chrome* curl_edge* curl_safari* out/
# Replace /bin/bash with /bin/ash # Replace /usr/bin/env bash with /usr/bin/env ash
RUN sed -i 's@/bin/bash@/bin/ash@' out/curl_* RUN sed -i 's@/usr/bin/env bash@/usr/bin/env ash@' out/curl_*
RUN chmod +x out/curl_* RUN chmod +x out/curl_*
# When using alpine, create a final, minimal image with the compiled binaries # When using alpine, create a final, minimal image with the compiled binaries

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -120,8 +120,8 @@ RUN ! (ldd ./out/curl-impersonate | grep -q -e nghttp2 -e brotli -e ssl -e crypt
# Wrapper scripts # Wrapper scripts
COPY curl_ff* out/ COPY curl_ff* out/
# Replace /bin/bash with /bin/ash # Replace /usr/bin/env bash with /usr/bin/env ash
RUN sed -i 's@/bin/bash@/bin/ash@' out/curl_* RUN sed -i 's@/usr/bin/env bash@/usr/bin/env ash@' out/curl_*
RUN chmod +x out/curl_* RUN chmod +x out/curl_*
# When using alpine, create a final, minimal image with the compiled binaries # When using alpine, create a final, minimal image with the compiled binaries

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Find the directory of this script # Find the directory of this script
dir=${0%/*} dir=${0%/*}