feat: added install.sh for easy isntall of eiipm
This commit is contained in:
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
||||
### Added
|
||||
|
||||
- Added commit hash based install/update for security reasons.
|
||||
- `install.sh` file for easy install in Linux.
|
||||
|
||||
## [0.3.0] - 2025-08-22
|
||||
|
||||
|
||||
@@ -6,7 +6,25 @@ Eiipm is a fast and eligant package manager made in rust for [Ewwii](https://git
|
||||
|
||||
You can install **eiipm** using the same [methods we discussed](https://ewwii-sh.github.io/ewwii/installation.html) of in Ewwii:
|
||||
|
||||
#### 1. From source
|
||||
#### 1. From installer (fastest)
|
||||
|
||||
```bash
|
||||
curl -sSL https://raw.githubusercontent.com/Ewwii-sh/eiipm/main/install.sh -o install.sh
|
||||
less install.sh # inspect installer code (optional)
|
||||
sh install.sh # run the installer
|
||||
```
|
||||
|
||||
After, after the installation, verify it works:
|
||||
|
||||
```bash
|
||||
eiipm --version
|
||||
```
|
||||
|
||||
> The installer installs the binary to `/usr/local/bin`
|
||||
>
|
||||
> If eiipm doesn't work after the installation, make sure that `/usr/local/bin` is in path.
|
||||
|
||||
#### 2. From source
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Ewwii-sh/eiipm
|
||||
@@ -16,7 +34,7 @@ cargo build --release
|
||||
|
||||
This will generate the `eiipm` binary in `target/release`.
|
||||
|
||||
#### 2. Using Cargo
|
||||
#### 3. Using Cargo
|
||||
|
||||
```bash
|
||||
cargo install --git https://github.com/Ewwii-sh/eiipm
|
||||
|
||||
66
install.sh
Executable file
66
install.sh
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
INSTALLER_VERSION="1.0.0"
|
||||
|
||||
# --- Colors ---
|
||||
RED=$(printf '\033[31m')
|
||||
GREEN=$(printf '\033[32m')
|
||||
YELLOW=$(printf '\033[33m')
|
||||
BLUE=$(printf '\033[34m')
|
||||
BOLD=$(printf '\033[1m')
|
||||
RESET=$(printf '\033[0m')
|
||||
|
||||
# --- Banner ---
|
||||
echo "${BLUE}${BOLD}"
|
||||
echo "============================================="
|
||||
echo " eiipm Installer (v$INSTALLER_VERSION)"
|
||||
echo "============================================="
|
||||
echo "${RESET}"
|
||||
|
||||
# --- Ask OS ---
|
||||
echo "${YELLOW}Which OS are you installing on?${RESET}"
|
||||
echo " [1] Linux"
|
||||
echo " [2] macOS"
|
||||
printf "Enter choice [1/2]: "
|
||||
read choice
|
||||
|
||||
if [ "$choice" = "2" ]; then
|
||||
echo "${RED}Sorry, macOS is not yet supported by this installer.${RESET}"
|
||||
echo
|
||||
echo "${YELLOW}Build from source instructions:${RESET}"
|
||||
echo " 1. Install Rust (https://www.rust-lang.org/)"
|
||||
echo " 2. Clone the repo:"
|
||||
echo " git clone https://github.com/Ewwii-sh/eiipm.git"
|
||||
echo " 3. Build:"
|
||||
echo " cd eiipm && cargo build --release"
|
||||
echo " 4. Move binary into PATH:"
|
||||
echo " mv ./target/release/eiipm /usr/local/bin/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- Continue for Linux ---
|
||||
echo "${GREEN}Great! Proceeding with Linux installation...${RESET}"
|
||||
|
||||
REPO="Ewwii-sh/eiipm"
|
||||
LATEST_URL="https://github.com/$REPO/releases/latest"
|
||||
DOWNLOAD_URL=$(curl -sL -o /dev/null -w '%{url_effective}' "$LATEST_URL" | sed 's/tag/download/')
|
||||
BIN_NAME="eiipm"
|
||||
|
||||
# Create temp dir
|
||||
TMP_DIR=$(mktemp -d)
|
||||
cd "$TMP_DIR"
|
||||
|
||||
echo "${BLUE}Downloading latest $BIN_NAME release...${RESET}"
|
||||
curl -sL "$DOWNLOAD_URL/eiipm" -o "$BIN_NAME"
|
||||
|
||||
echo "${BLUE}Granting eiipm executable permission...${RESET}"
|
||||
chmod +x "$BIN_NAME"
|
||||
|
||||
echo "${BLUE}Installing to /usr/local/bin (requires sudo)...${RESET}"
|
||||
sudo mv "$BIN_NAME" /usr/local/bin/
|
||||
|
||||
echo ""
|
||||
echo "${GREEN}${BOLD}⭐✨ Installation complete! ✨⭐${RESET}"
|
||||
echo ""
|
||||
echo "Run '${BOLD}eiipm${RESET}' to get started."
|
||||
Reference in New Issue
Block a user