{"id":14155034,"url":"https://github.com/electrocucaracha/pkg-mgr_scripts","last_synced_at":"2025-04-05T17:32:46.615Z","repository":{"id":37313970,"uuid":"242253079","full_name":"electrocucaracha/pkg-mgr_scripts","owner":"electrocucaracha","description":"Remote bash-based Linux package manager ","archived":false,"fork":false,"pushed_at":"2024-10-30T01:19:42.000Z","size":1820,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T03:56:11.103Z","etag":null,"topics":["bash","curl","installer","linux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electrocucaracha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-02-22T00:12:05.000Z","updated_at":"2024-10-25T15:15:56.000Z","dependencies_parsed_at":"2023-12-25T02:21:19.084Z","dependency_job_id":"123cdda6-0634-4cb4-9bdc-d02264a7eda3","html_url":"https://github.com/electrocucaracha/pkg-mgr_scripts","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/electrocucaracha%2Fpkg-mgr_scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrocucaracha%2Fpkg-mgr_scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrocucaracha%2Fpkg-mgr_scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrocucaracha%2Fpkg-mgr_scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electrocucaracha","download_url":"https://codeload.github.com/electrocucaracha/pkg-mgr_scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247375390,"owners_count":20929014,"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":["bash","curl","installer","linux"],"created_at":"2024-08-17T08:01:44.136Z","updated_at":"2025-04-05T17:32:41.606Z","avatar_url":"https://github.com/electrocucaracha.png","language":"Shell","funding_links":[],"categories":["bash"],"sub_categories":[],"readme":"# cURL package installer\n\u003c!-- markdown-link-check-disable-next-line --\u003e\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Docker Pulls](https://img.shields.io/docker/pulls/electrocucaracha/pkg_mgr-init.svg)](https://img.shields.io/docker/pulls/electrocucaracha/pkg_mgr-init)\n[![GitHub Super-Linter](https://github.com/electrocucaracha/pkg-mgr_scripts/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)\n\u003c!-- markdown-link-check-disable-next-line --\u003e\n![visitors](https://visitor-badge.laobi.icu/badge?page_id=electrocucaracha.pkg-mgr_scripts)\n[![Scc Code Badge](https://sloc.xyz/github/electrocucaracha/pkg-mgr_scripts?category=code)](https://github.com/boyter/scc/)\n[![Scc COCOMO Badge](https://sloc.xyz/github/electrocucaracha/pkg-mgr_scripts?category=cocomo)](https://github.com/boyter/scc/)\n\nThis project pretends to centralize and facilitate the process to\ninstall and configure some Linux projects on major different Linux\nDistributions.\n\nWhy using curl instead of wget? Daniel Stenberg [explains](https://daniel.haxx.se/docs/curl-vs-wget.html)\nthat curl works like a traditional Unix `cat` command and can do a\nsingle-shot transfer data\n\nWhy not using configuration management tools like [Ansible](https://www.ansible.com/),\n[Puppet](https://puppet.com) or [Chef](https://www.chef.io/)? These\ngreat tools require an initial installation step for its operation\nwhich results in additional undesired packages in the OS.\n\n## Supported distributions\n\n| Name       | Version           |\n|:-----------|:-----------------:|\n| Ubuntu     | 16.04/18.04/20.04 |\n| CentOS     | 7/8               |\n| OpenSUSE   | Tumbleweed/Leap   |\n\n## How to use this script?\n\nThe [install.sh](install.sh) bash script has been created to abstract\nthe differences between different Linux distributions. For example, in\norder to install and configure Docker service the following\ninstruction is needed:\n\n```bash\ncurl -fsSL http://bit.ly/install_pkg | PKG=\"docker docker-compose\" bash\n```\n\n```mermaid\nflowchart TB\n    A((start)) -- HTTP request --\u003e B[bit.ly server redirects to raw.githubusercontent.com];\n    B --\u003e C[responds with the install script];\n    C --\u003e D[runs bash script];\n    D --\u003e E --\u003e P;\n    subgraph E [pkg-mgr_scripts/install.sh]\n        direction TB\n        F{is PKG_UPDATE set to `true`?};\n        F -- yes --\u003e G[runs `update_repos` function] --\u003e H;\n        F -- no --\u003e H{does PKG_COMMANDS_LIST have values?};\n        H -- yes --\u003e I[collect PKG values];\n        H -- no --\u003e J;\n        I --\u003e J;\n        subgraph J [`main` function]\n            direction TB\n            subgraph K [`_check_requirements` function]\n                L[validates passwordless sudo];\n            end\n            L --\u003e M[defines INSTALLER_CMD and PKG_OS_FAMILY vars];\n            M --\u003e N{is PKG defined?};\n            N -- yes --\u003e O[filters unsupported PKG values];\n            N -- no --\u003e Q;\n            O --\u003e P[executes INSTALLER_CMD + filtered PKG] --\u003e Q;\n        end\n    end\n    Q((end));\n```\n\n`bit.ly/install_pkg` redirects to the install script in this repository and the invocation above is equivalent to:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/electrocucaracha/pkg-mgr_scripts/master/install.sh | PKG=\"docker docker-compose\" bash\n```\n\n### Program environment variables\n\n| Name         | Description                                                               |\n|:-------------|:--------------------------------------------------------------------------|\n| PKG          | Package name(s) to be installed on the requester.(String value)           |\n| PKG_UPDATE   | Update package manager metadata information.(Boolean value)               |\n| PKG_DEBUG    | Enable verbose output during the execution.(Boolean value)                |\n\n### Bindep usage\n\nThe cURL package installer can be combined with [bindep tool][1] to\nperform multiOS installations. The following example demostrates how\nto install the [Portable Hardware Locality tools][2] in the current\nmachine.\n\n```bash\ncurl -fsSL http://bit.ly/install_pkg | PKG=bindep bash\n\ncat \u003c\u003c EOF \u003e bindep.txt\nhwloc [node]\nhwloc-lstopo [node platform:suse]\nEOF\ncurl -fsSL http://bit.ly/install_pkg | PKG=\"$(bindep node -b)\" bash\n\nlstopo-no-graphics\n```\n\nOr use the [wrapper script][3] provided to run in a single command\n\n```bash\ncurl -fsSL http://bit.ly/install_bin | PKG_BINDEP_PROFILE=node bash\n```\n\n### Installing multiple commands\n\nIt's also possible to install multiple command-line tools with a single\ncURL call. The following example will install docker, kind and kubectl\ncommands.\n\n```bash\ncurl -fsSL http://bit.ly/install_pkg | PKG_COMMANDS_LIST=\"docker,kind,kubectl\" bash\n```\n\n[1]: https://docs.openstack.org/infra/bindep/\n[2]: https://www.open-mpi.org/projects/hwloc/\n[3]: bindep_install.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrocucaracha%2Fpkg-mgr_scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectrocucaracha%2Fpkg-mgr_scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrocucaracha%2Fpkg-mgr_scripts/lists"}