GNU General Public License v3.0

项目介绍

Cyclenerd/postinstall 是一个托管在 GitHub 上的开源项目,主要使用 Shell 编写,采用 GNU General Public License v3.0 许可证,目前获得 163 个 Star、34 次 Fork。

仓库全名
Cyclenerd/postinstall
开源许可证
GNU General Public License v3.0
Star 数
163
Fork 数
34
未关闭 Issue
4

README 摘要

postinstall.sh Bash Script to automate post-installation steps. Helps to install packages on different operating systems: [x] Alpine Linux [x] Android (Termux) [x] Apple macOS [x] Arch Linux [x] CentOS [x] Debian [x] Fedora [x] FreeBSD [x] Haiku [x] Mageia [x] NetBSD [x] OpenBSD [x] OpenWRT [x] Puppy [x] RedHat [x] RockyLinux [x] Slackware [x] SUSE [x] Ubuntu [x] Windows (Cygwin) Overview postinstall.sh is simple…

完整内容见 GitHub 原始 README 或本页 。

常见问题

postinstall 用什么语言开发?

主要使用 Shell 编写,采用 GNU General Public License v3.0 许可证,目前有 163 个 Star。

postinstall 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 postinstall 的源码?

可以直接克隆仓库:git clone https://github.com/Cyclenerd/postinstall.git,默认分支为 master;安装与运行步骤见仓库 README。

postinstall 最近还在维护吗?

仓库最近一次更新为 4月8日,当前有 4 个未关闭 Issue;Star 数为 163,可作为社区活跃度的参考。

关于

💻 Bash Script to automate post-installation steps

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Shell

README

postinstall.sh

Bash Script to automate post-installation steps. Helps to install packages on different operating systems:

  • Alpine Linux
  • Android (Termux)
  • Apple macOS
  • Arch Linux
  • CentOS
  • Debian
  • Fedora
  • FreeBSD
  • Haiku
  • Mageia
  • NetBSD
  • OpenBSD
  • OpenWRT
  • Puppy
  • RedHat
  • RockyLinux
  • Slackware
  • SUSE
  • Ubuntu
  • Windows (Cygwin)

Overview

postinstall.sh is simple bash shell script which in turn generates scripts. The generation depends on the operating system and type of installation. The templates that are included in the generation can be stored in the file system or on a web server. This can also be your GitHub repository. Just fork this repository and edit it according to your needs.

postinstall.sh is not a configuration management system. If you want to install many servers automatically, you should look at ansible. But if you want to quickly reinstall your laptop or Raspberry Pi, postinstall.sh can help you.

Please check the Wiki for more information.

Installation

Download:

curl -O "https://raw.githubusercontent.com/Cyclenerd/postinstall/master/postinstall.sh"

Alternative download with short URL:

curl -fL http://bit.ly/get_postinstall -o postinstall.sh

Create a package lists and scripts as explained in this repository or in the Wiki.

Example:

mkdir install
cd install
vi packages.list

Run as root:

bash postinstall.sh -b install

Usage

Usage: postinstall.sh [-t <TYPE>] [-b <BASE>] [-h]:
        [-t <TYPE>]      sets the type of installation (default: server)
        [-b <BASE>]      sets the base url or dir (default: https://raw.githubusercontent.com/Cyclenerd/postinstall/master/base)
        [-h]             displays help (this message)

Example: postinstall.sh or postinstall.sh -t workstation

Screenshot

WSL

Program Flow

  • Determine operating system and architecture
  • Check package manager and requirements
  • Generate script to run before and after installation and list of packages to install
  • Install packages

Requirements

Only bash, curl, tput (ncurses-utils) and a package manager for the respective operating system:

  • Alpine Linux → apk
  • Apple macOS → port or brew
  • Arch Linux → pacman
  • Cygwin → apt-cyg
  • Debian / Ubuntu → apt-get
  • FreeBSD → pkg
  • Haiku → pkgman
  • Mageia → urpmi
  • NetBSD → pkg_add
  • OpenBSD → pkg_add
  • OpenWRT → opkg
  • Puppy → pkg (https://gitlab.com/sc0ttj/Pkg)
  • Red Hat / Fedora / CentOS → dnf or yum
  • Slackware → slackpkg
  • SUSE / openSUSE → zypper
  • Termux → pkg

TODO

  • More and better documentation
  • Support for even more operating systems and package managers

Help is welcome 👍

License

GNU Public License version 3. Please feel free to fork and modify this on GitHub (https://github.com/Cyclenerd/postinstall).

评论

暂无评论