Created
August 5, 2016 07:38
-
-
Save JonasGroeger/3ebaeb9481211eaef2238296c006ea9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # This script copies the contents of the block below into a file. | |
| # Useful for self-extracting configuration files or the like. | |
| # | |
| # Author: Jonas Gröger <[email protected]> | |
| # | |
| <<DATASECTION | |
| Put the contents of the file here | |
| DATASECTION | |
| ME="$(realpath $0)" | |
| TARGET_FILE="somefile" | |
| sed '/<<DATASECTION/,/DATASECTION/!d;//d' "$ME" > "$TARGET_FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment