diff --git a/README.md b/README.md index e56a8358..7d2a9e9a 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,15 @@ make install DESTDIR=$HOME/altroot make install-manpages DESTDIR=$HOME/altroot ``` + +### Installing Apx using a shell script + +This script installs and sets up Apx automatically when you execute it, make sure you have `curl` and `git` installed, then clone this project and run it. + +```bash +bash <(curl -s https://raw.githubusercontent.com/Vanilla-OS/apx/v2/install.sh) +``` + ## Community Packages Apx is packaged in various sources by our community, if you aren't comfortable with building `apx` manually you can install a package listed below. diff --git a/install.sh b/install.sh new file mode 100644 index 00000000..5a754f0f --- /dev/null +++ b/install.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +echo "Please enter or create a working directory." +read -r WORK_DIR + +mkdir -p "$WORK_DIR" # Creates the working directory if non existing + +cd "$WORK_DIR" + +curl -LO https://github.com/89luca89/distrobox/archive/refs/tags/1.7.2.1.tar.gz +tar -xzf 1.7.2.1.tar.gz + +curl -LO https://github.com/Vanilla-OS/apx/releases/download/continuous/apx.tar.gz +tar -xzf apx.tar.gz +mv apx "$HOME/.local/bin/apx2" +chmod +x "$HOME/.local/bin/apx2" + +mkdir -p "$HOME/.config/apx" +echo '{ + "apxPath": "'"$HOME/.local/share/apx/"'", + "distroboxpath": "'"$WORK_DIR/distrobox-1.7.2.1/distrobox"'", + "storageDriver": "btrfs" +}' > "$HOME/.config/apx/apx.json" + +git clone https://github.com/Vanilla-OS/vanilla-apx-configs.git "$WORK_DIR/vanilla-apx-configs" +mv "$WORK_DIR/vanilla-apx-configs/stacks" "$HOME/.local/share/apx/" +mv "$WORK_DIR/vanilla-apx-configs/package-managers" "$HOME/.local/share/apx/" + +echo "Installation completed. You can now use Apx v2 by running 'apx2'." +apx2 --version