{"id":26647266,"url":"https://github.com/offirmo/offirmo-shell-lib","last_synced_at":"2025-10-15T19:07:13.423Z","repository":{"id":5312765,"uuid":"6494800","full_name":"Offirmo/offirmo-shell-lib","owner":"Offirmo","description":"A collection of useful bash reusable functions for robust and advanced shell scripts. Used to power cvm and simpli.","archived":false,"fork":false,"pushed_at":"2015-02-13T00:40:13.000Z","size":292,"stargazers_count":25,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T02:44:59.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"plimble/ace","license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Offirmo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-01T18:42:33.000Z","updated_at":"2024-07-17T12:28:25.000Z","dependencies_parsed_at":"2022-09-14T21:22:36.983Z","dependency_job_id":null,"html_url":"https://github.com/Offirmo/offirmo-shell-lib","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Offirmo/offirmo-shell-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Foffirmo-shell-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Foffirmo-shell-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Foffirmo-shell-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Foffirmo-shell-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Offirmo","download_url":"https://codeload.github.com/Offirmo/offirmo-shell-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Foffirmo-shell-lib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261808048,"owners_count":23212687,"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":"2025-03-24T23:51:34.282Z","updated_at":"2025-10-15T19:07:08.392Z","avatar_url":"https://github.com/Offirmo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Offirmo-shell-lib\n=================\n\nThe Offirmo Shell Lib (OSL) is a collection of useful shell functions for robust and advanced shell scripts.\n\nRequirements : I use bash.\n\nAvailable at : https://github.com/Offirmo/offirmo-shell-lib\n\nNote : The OSL has unit tests for maximum quality.\n\n\nIntroduction\n============\n\nThe user story\n--------------\nI found myself having to write a lot of shell scripts, for work and for home.\n\nOver the time, I had to develop a lot of useful functions.\n\nOne day, I cleaned them up and packed them in this lib. Enjoy !\n\nRequirements\n------------\nThe OSL is targeted at bash. Never tested with another shell.\n\nInstallation\n------------\nGet a copy of the files and set your path to point to the OSL \"bin\" dir.\nYou can check if it works by typing :\n\n `osl_help.sh`\n\nIn your scripts, add this as soon as possible (ideally first instruction in your script for maximum features) :\n\n `source osl_lib_init.sh`\n\nUsage\n-----\n\nOn demand, source other OSL files as needed :\n\nlibs :\n- `osl_lib_archive.sh     `  --\u003e decompress any archive file\n- `osl_lib_capabilities.sh`  --\u003e detect version and check capabilities of host OS\n- `osl_lib_debug.sh       `  --\u003e traces\n- `osl_lib_exit.sh        `  --\u003e to abort execution with nice messages\n- `osl_lib_file.sh        `  --\u003e path manipulations, ensure a line is\n- `osl_lib_init.sh        `  --\u003e allow output saving and various nice hacks\n- `osl_lib_mutex.sh       `  --\u003e create and use mutexes (note : use 'rsrc' wrapper for additional features)\n- `osl_lib_output.sh      `  --\u003e various display functions : error, warnings...\n- `osl_lib_rsrc.sh        `  --\u003e safe rsrc manipulation protected by mutex\n- `osl_lib_sspec.sh       `  --\u003e shell unit tests, inspired from rspec\n- `osl_lib_stamp.sh       `  --\u003e manip of stamp files to detect access time and interferences (note : use 'rsrc' wrapper for additional features)\n- `osl_lib_string.sh      `  --\u003e string utilities\n- `osl_lib_ui.sh          `  --\u003e UI functions like asking yes or no, pause...\n- `osl_lib_version.sh     `  --\u003e version comparison utilities (newer/older)\n- `osl_inc_ansi_codes.sh  `  --\u003e defines ANSI codes for color\n\nSpecial files :\n- `osl_help.sh`  --\u003e callable, display current OSL version\n- `osl_inc_env.sh`  --\u003e various constants\n\nExperimental / in progress :\n- `osl_lib_interrupt_func.sh`  --\u003e exit hook (for mutex auto release)\n\nEnv variables : OSL will respond to a few environment variables :\n* OSL_console_has_light_scheme=true (default false) will adjust colored output styles to be more readable on a white background\n\nThat's it. You can now use the features.\n\n\nThe functions\n=============\n\nFor now, look inside the unit tests of the file you're interested in, or look in the file itself.\n\nTODO\n====\n\n- Better doc ;)\n- improve decompression function\n- refactor mutex code to avoid duplication\n- mutex switch from read to write ?\n- forward and aggregate state in rsrc fuctions\n- Make default values redefinable\n- Make it easier to disable color\n- remove \"bashisms\"\n- asserts ?\n- More...\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffirmo%2Foffirmo-shell-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffirmo%2Foffirmo-shell-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffirmo%2Foffirmo-shell-lib/lists"}