mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-13 18:14:24 +02:00
Update setup.sh
This commit is contained in:
16
bin/setup.sh
16
bin/setup.sh
@@ -5,6 +5,12 @@
|
|||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
if [ (id -u) -eq 0 ]; then
|
||||||
|
echo ""
|
||||||
|
echo "[X] You cannot run this script as root. You must run it as a non-root user with sudo ability."
|
||||||
|
echo " (create a new non-privileged user 'archivebox' if necessary, then re-run the script as that user)"
|
||||||
|
fi
|
||||||
|
|
||||||
if (which docker-compose > /dev/null && docker pull archivebox/archivebox:latest); then
|
if (which docker-compose > /dev/null && docker pull archivebox/archivebox:latest); then
|
||||||
echo "[+] Initializing an ArchiveBox data folder at ~/archivebox/data using Docker Compose..."
|
echo "[+] Initializing an ArchiveBox data folder at ~/archivebox/data using Docker Compose..."
|
||||||
mkdir -p ~/archivebox
|
mkdir -p ~/archivebox
|
||||||
@@ -111,6 +117,9 @@ elif which brew > /dev/null; then
|
|||||||
brew tap archivebox/archivebox
|
brew tap archivebox/archivebox
|
||||||
brew update
|
brew update
|
||||||
brew install --fetch-HEAD -f archivebox
|
brew install --fetch-HEAD -f archivebox
|
||||||
|
elif which pkg > /dev/null; then
|
||||||
|
echo "[+] Installing ArchiveBox and its dependencies using pkg..."
|
||||||
|
sudo pkg install python37 py37-pip py37-sqlite3 node npm wget curl youtube_dl ffmpeg git ripgrep
|
||||||
else
|
else
|
||||||
echo "[!] Warning: Could not find aptitude or homebrew! May not be able to install all dependencies automatically."
|
echo "[!] Warning: Could not find aptitude or homebrew! May not be able to install all dependencies automatically."
|
||||||
echo ""
|
echo ""
|
||||||
@@ -131,9 +140,10 @@ if ! (python3 --version && python3 -m pip --version); then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# echo "[+] Upgrading npm and pip..."
|
echo ""
|
||||||
# npm i -g npm
|
echo "[+] Upgrading npm and pip..."
|
||||||
# python3 -m pip install --upgrade pip setuptools
|
npm i -g npm || true
|
||||||
|
python3 -m pip install --upgrade pip setuptools || true
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "[+] Installing ArchiveBox and its dependencies using pip..."
|
echo "[+] Installing ArchiveBox and its dependencies using pip..."
|
||||||
|
Reference in New Issue
Block a user