{"id":15588262,"url":"https://github.com/hschne/gatsh","last_synced_at":"2026-05-03T19:31:35.776Z","repository":{"id":75458407,"uuid":"179325857","full_name":"hschne/gatsh","owner":"hschne","description":"gatsh is a simple shell script to compile multiple shell scripts into a single one","archived":false,"fork":false,"pushed_at":"2019-05-28T22:54:47.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T11:03:40.479Z","etag":null,"topics":["bash","bash-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hschne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-03T16:10:09.000Z","updated_at":"2021-08-19T22:12:28.000Z","dependencies_parsed_at":"2023-06-06T13:15:13.858Z","dependency_job_id":null,"html_url":"https://github.com/hschne/gatsh","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"ec2c36b8985bc74c920f449d2df9ef8e002c681d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hschne/gatsh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschne%2Fgatsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschne%2Fgatsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschne%2Fgatsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschne%2Fgatsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hschne","download_url":"https://codeload.github.com/hschne/gatsh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschne%2Fgatsh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32582492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-script"],"created_at":"2024-10-02T22:22:15.029Z","updated_at":"2026-05-03T19:31:35.761Z","avatar_url":"https://github.com/hschne.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eGatsh\u003c/h1\u003e \n\u003cp align=\"center\"\u003eRecursively inline files required by your scripts\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://forthebadge.com\"\u003e\u003cimg src=\"https://forthebadge.com/images/badges/built-with-science.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://forthebadge.com\"\u003e\u003cimg src=\"https://forthebadge.com/images/badges/for-you.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n## What is this? \n\nGatsh parses your script files for references to other scripts and inlines the contents of those. The idea is to allow people to split their shell scripts into multiple files while still giving them the possibility to distribute a single file. \n\nLet's say you have a file `root.sh` that references a bunch of other files like `logger.sh` and `colors.sh`: \n\n```bash\n# root.sh\nsource lib/logger.sh\n\nlog \"Hello World!\"\n\n# lib/logger.sh\nsource colors.sh\n\nlog()  {\n  local message=$1\n  echo \"${GREEN}[INFO]${DEFAULT} $message\"\n}\n\n# lib/colors.sh\nDEFAULT=\"\\e[39m\"\nRED=\"\\e[31m\"\nGREEN=\"\\e[32m\"\n```\n\nRunning `gatsh root.sh` will inline source imports and yield:\n\n```bash\n# root.sh\nDEFAULT=\"\\e[39m\"\nRED=\"\\e[31m\"\nGREEN=\"\\e[32m\"\n\nlog()  {\n  local message=$1\n  echo \"${GREEN}[INFO]${DEFAULT} $message\"\n}\n\nlog \"Hello World!\"\n```\n\n## Installation\n\nDownload the latest version from Gatsh from the releases page or get the latest version. \n\n```\nwget https://raw.githubusercontent.com/hschne/gatsh/master/gatsh \u0026\u0026 chmod +x gatsh\n```\n\nAdd Gatsh to your path to make it available from any location.\n\n## Usage\n\nUsage is straight forward - simply run\n\n```\ngatsh infile.sh \u003e infile_gatsh.sh\n```\n\nto concatinate `infile.sh` and all its dependencies. Gatsh supports the following options:\n\n```\n-o|--outfile  Redirects the output to the specified file\n-h|--help     Displays the help dialog\n```\n\n## Development\n\n### Testing\n\nGatsh uses [bats-core](https://github.com/bats-core/bats-core) for tests. Additionally, a number of extension for bats are in use.\n\nIn order to run the tests you must first initialize the extension submodules. \n\n```\ngit submodule init\ngit submodule update\n```\n\nBats features both system tests, which verify that the whole script works, and unit tests, which verify specific functions. You can run both using\n\n```bash\nbats test/gatsh.bats # System tests, use test files\nbats test/unit.bats # Individual function tests\n```\n\nSystem tests rely on a number of files that can be found in `tests/files`.\n\n## License\n\n[MIT](LICENSE) (c) [@hschne](https://github.com/hschne)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhschne%2Fgatsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhschne%2Fgatsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhschne%2Fgatsh/lists"}