From 83677d5c27ee4eec1726fa7a441404c42f9f5725 Mon Sep 17 00:00:00 2001 From: th3r00t Date: Sat, 9 Aug 2025 21:17:05 +0000 Subject: [PATCH] Updating installer --- install.sh | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/install.sh b/install.sh index b9b965a..03b7fe0 100755 --- a/install.sh +++ b/install.sh @@ -4,32 +4,34 @@ cd /tmp/ git clone https://github.com/th3r00t/pyShelf.git cd /tmp/pyShelf/ -# create pyshelf system user if it doesn't exist -if ! id -u pyshelf >/dev/null 2>&1; then - sudo useradd -r -s /usr/bin/nologin pyshelfA - sudo mkdir -p /home/pyshelf - sudo chown pyshelf:pyshelf /home/pyshelf - sudo chmod 755 /home/pyshelf -fi # make home dir for pyshelf user if it doesn't exist + +# Ensure the correct branch is checked out before installing dependencies +git fetch origin +git checkout 0.8.0--dev + +# if on arch linux, install python3-uv +if [ -f /etc/arch-release ]; then + # create pyshelf system user if it doesn't exist + if ! id -u pyshelf >/dev/null 2>&1; then + sudo useradd -r -s /usr/bin/nologin pyshelf + fi + sudo pacman --noconfirm -Syy python python-uv git nodejs npm base-devel --needed +else + # create pyshelf system user if it doesn't exist + if ! id -u pyshelf >/dev/null 2>&1; then + sudo useradd -r -s /usr/sbin/nologin pyshelf + fi + sudo apt-get update + sudo apt-get install -y git python3-uv python3 python3-pip nodejs npm libxml2 libxslt1-dev zlib1g-dev libjpeg-turbo8-dev build-essential +fi + if [ ! -d /home/pyshelf ]; then sudo mkdir -p /home/pyshelf sudo chown pyshelf:pyshelf /home/pyshelf sudo chmod 755 /home/pyshelf fi -# Ensure the correct branch is checked out before installing dependencies -git fetch origin -git checkout 0.8.0--dev-zipapp - -# if on arch linux, install python3-uv -if [ -f /etc/arch-release ]; then - sudo pacman --noconfirm -Syy python-uv -else - sudo apt-get update - sudo apt-get install -y python3-uv python3 python3-pip nodejs npm libxml2 libxslt1-dev zlib1g-dev libjpeg-turbo8-dev build-essential -fi - sudo mkdir /etc/pyShelf sudo cp -avR . /etc/pyShelf cd /etc/pyShelf