Skip to content

Instantly share code, notes, and snippets.

@rubeniskov
Created May 3, 2018 14:56
Show Gist options
  • Save rubeniskov/c95816509a81c2a378055b7339e49a9d to your computer and use it in GitHub Desktop.
Save rubeniskov/c95816509a81c2a378055b7339e49a9d to your computer and use it in GitHub Desktop.
Concatenate bash sources once to create standalone file
# $(call concat_bash_sources,<main.sh>[,header,footer])
define concat_bash_sources
echo "$(1)" |\
awk -v header="$(2)" \
-v footer="$(3)" \
-f <(wget -q -O - https://gist.githubusercontent.com/rubeniskov/b039a9a37827421e7eb3981a29d36c01/raw)
endef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment