package manager written in bash
A Package manager written in bash
with a makepkg
-like format
Above those are the reasons why i made this script ?
cat
, sed
, less
, rm
, awk
, etc.) and mktemp
which is included in major distributions and macOS as wellThese dependencies are needed if you're performing certain tasks.
these are mainly used for update
function as well to download buildscripts and source code from internet sources
It usually takes less than a minute to install. you may download shpkg script
curl -fsSL https://raw.githubusercontent.com/WMCB-Tech/shpkg/master/shpkg | tee shpkg
Features include:
Build scripts are stored in your home directory which is ~/.shpkg
. containing all build script directories
~ $ ls -R ~/.shpkg
bash:
SHPKG_BUILD
hello-world:
SHPKG_BUILD hello_world.c
Sample build script
# package name
shpkg_name="Hello World"
# package build dependencies
shpkg_build_depends="make automake gcc clang"
# package architecture
shpkg_arch_only=('amd64' 'i386')
# package version
shpkg_version="2.9"
# package source code
shpkg_source="https://mirror.ossplanet.net/gnu/hello/hello-${shpkg_version}.tar.gz"
prepare(){
cd "${SRCDIR}"
./configure --prefix=/opt/shpkg/gnu-hello
}
build(){
make -j$(nproc)
}
finish(){
${SHPKG_SUDO} make install
}
remove(){
${SHPKG_SUDO} rm -rf /opt/shpkg/gnu-hello
}
See the docs for more information
You can also setup repository where build scripts are being downloaded. the repository list location is located at ~/.config/shpkg-repo.list
Example config file:
# this is a comment
https://github.com/foo/bar.git
https://example.com/foo/bar.tar.gz
https://example.com/foo/bar.zip
Your repository root directory (/
) should have build scripts directory which shown above. it will download and move all files to ~/shpkg
directory which contains all buildscripts
Steps include:
~/.shpkg
directoryDirectory structure for your repository must be used as follows:
SHPKG_BUILD
- Is this a POSIX compliant script?
Yes but quite. this script is almost using POSIX functions but not all of them as this is a bash script that needs certain bash features
- Is windows supported?
Yes but no. Windows is very different amongst POSIX/Unix standards, you can install mingw/cygwin tools which includes bash and common unix tools
however you may try Scoop as an awesome alternative
You may contribute. issues and pull requests are welcome! you are also free to fork this repo!
If you have any further questions. you may ask in discussions tab