{"id":14069374,"url":"https://github.com/client9/shlib","last_synced_at":"2025-04-06T00:09:20.863Z","repository":{"id":28545609,"uuid":"91032775","full_name":"client9/shlib","owner":"client9","description":"portable functions for posix shell environments","archived":false,"fork":false,"pushed_at":"2024-05-18T05:16:06.000Z","size":73,"stargazers_count":386,"open_issues_count":14,"forks_count":37,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T23:09:32.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/client9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-05-11T23:48:46.000Z","updated_at":"2025-03-23T17:36:03.000Z","dependencies_parsed_at":"2024-01-29T06:01:13.745Z","dependency_job_id":"d3f451ed-f4ad-4a62-b6c0-02fa3151cc90","html_url":"https://github.com/client9/shlib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client9%2Fshlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client9%2Fshlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client9%2Fshlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client9%2Fshlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/client9","download_url":"https://codeload.github.com/client9/shlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415967,"owners_count":20935387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-13T07:06:54.322Z","updated_at":"2025-04-06T00:09:20.837Z","avatar_url":"https://github.com/client9.png","language":"Shell","funding_links":[],"categories":["others","Shell"],"sub_categories":[],"readme":"# shlib\nportable functions for posix shell environments\n\n[![Build Status](https://travis-ci.org/client9/shlib.svg?branch=master)](https://travis-ci.org/client9/shlib)\n\nI've sadly written a lot of shell scripts.   Mostly for installers on\ncompletely alien environments.\n\nReally shell code should only be used for boot-strapping to something sane.  Until then you might need some truly portable functions.  I hope you never need to use them, but if you do they are [public domain](http://unlicense.org).  Do whatever you'd like with them.\n\nHowever acknowledgement (and pull requests) are appreciated.  You can optionally include [license.sh](license.sh) so the next person knows where to find them.\n\n## Usage\n\nHere's an example of how create and compress a custom set of functions.  Using `grep -v '^#' | grep -v ' #' | tr -s '\\n'` strips away comments and blank lines.\n\n```bash\ncat \\\n  license.sh \\\n  is_command.sh \\\n  uname.sh \\\n  untar.sh \\\n  mktmpdir.sh \\\n  http_download.sh \\\n  hash_sha256.sh \\\n  license_end.sh | \\\n  grep -v '^#' | grep -v ' #' | tr -s '\\n'\n```\n\n## WIP\n\nSome of these are new, some are these are pulled from old code I wrote.   All can definitely be\nimproved.  Pull requests very welcome:\n\n* Simplify\n* Clean up local variable use\n* Remove any \"exit 1\" I may have left behind\n\n## Testing\n\nI'm unlikely to work on this in the short term, but.. someone, someday could:\n\n* Probably write the test harness in go, not shell.\n* Using travis.ci we can definite test ubuntu, centos and alpine/busybox using docker\n* Can we test macOS on travis?  They support something here but unclear how it works.\n\n## Documentation\n\nI've start to write doco in Markdown as shell comments.  The plan would be to extract it to standalone markdown so it would display on GitHub.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient9%2Fshlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclient9%2Fshlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient9%2Fshlib/lists"}