mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-08-04 10:52:29 +00:00
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:
@@ -219,8 +219,8 @@ COPY curl_ff* out/
|
||||
COPY curl_chrome* curl_edge* curl_safari* out/
|
||||
{{/chrome}}
|
||||
{{#alpine}}
|
||||
# Replace /bin/bash with /bin/ash
|
||||
RUN sed -i 's@/bin/bash@/bin/ash@' out/curl_*
|
||||
# Replace /usr/bin/env bash with /usr/bin/env ash
|
||||
RUN sed -i 's@/usr/bin/env bash@/usr/bin/env ash@' out/curl_*
|
||||
{{/alpine}}
|
||||
RUN chmod +x out/curl_*
|
||||
{{#alpine}}
|
||||
|
@@ -130,8 +130,8 @@ RUN ! (ldd ./out/curl-impersonate | grep -q -e nghttp2 -e brotli -e ssl -e crypt
|
||||
|
||||
# Wrapper scripts
|
||||
COPY curl_chrome* curl_edge* curl_safari* out/
|
||||
# Replace /bin/bash with /bin/ash
|
||||
RUN sed -i 's@/bin/bash@/bin/ash@' out/curl_*
|
||||
# Replace /usr/bin/env bash with /usr/bin/env ash
|
||||
RUN sed -i 's@/usr/bin/env bash@/usr/bin/env ash@' out/curl_*
|
||||
RUN chmod +x out/curl_*
|
||||
|
||||
# When using alpine, create a final, minimal image with the compiled binaries
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -120,8 +120,8 @@ RUN ! (ldd ./out/curl-impersonate | grep -q -e nghttp2 -e brotli -e ssl -e crypt
|
||||
|
||||
# Wrapper scripts
|
||||
COPY curl_ff* out/
|
||||
# Replace /bin/bash with /bin/ash
|
||||
RUN sed -i 's@/bin/bash@/bin/ash@' out/curl_*
|
||||
# Replace /usr/bin/env bash with /usr/bin/env ash
|
||||
RUN sed -i 's@/usr/bin/env bash@/usr/bin/env ash@' out/curl_*
|
||||
RUN chmod +x out/curl_*
|
||||
|
||||
# When using alpine, create a final, minimal image with the compiled binaries
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
Reference in New Issue
Block a user