You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another standard library for shell (bash/zsh) with cross-shell support
OVERVIEW
The std.sh provides various sourceable cross-shell scripts that can be used by downstream as dependencies to detect OS type or Package Manager installations.
As of v1.0.0 only provides system-related functions and variables ONLY. NOTE: Do not use some of these scripts in CMake-based projects; use built-in variables instead.
Examples of scripts:
std-sys-os.sh
A cross-platform system-detection script - provides variables like OS_LINUX, OS_LINUX_DEBIAN or OS_BSD etc.; use cases include usage for specific system installation via shell scripts
std-sys-package-manager.sh
A cross-platform package-manager detection script - provides variables like PM_PKG, PM_DPKG, PM_YUM etc. ; use cases - detection of package manager for C/C++ project dependency installation
git clone --depth 1 git@github.com:hinell/std.sh.git /tmp/sh.std
cd${_}
./config install --user # install to ~/.local/bin
./config link --user # link to ~/.local/bin - dev-only
sudo ./config install # install into /usr/bin
The above will put executable/sourceable scripts into ${HOME}/.local/bin/ folder.
Don't forget to set PATH in your ~/.bashrc/.zshrc if you want to use user-local installation of executable scripts:
if [[ -d"$HOME/.local/bin" ]];then
PATH="$HOME/.local/bin:$PATH"fi
UNINSTALL
Depending on the installation method, use:
basher uninstall hinell/std.sh
# or
rm $HOME/.local/bin/std-*# or