1
0
Fork 0

Update setup.sh

This commit is contained in:
Nick Sweeting 2021-04-24 00:08:17 -04:00 committed by GitHub
parent 9f4e13d8b1
commit 431020e6e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,14 @@
#!/usr/bin/env bash
# ArchiveBox Setup Script: https://github.com/ArchiveBox/ArchiveBox
# Usage:
# curl 'https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/dev/bin/setup.sh' | sh
# curl 'https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/dev/bin/setup.sh' | bash
if (which docker-compose > /dev/null && docker pull archivebox/archivebox); then
echo "[+] Initializing an ArchiveBox data folder at ~/archivebox/data using Docker Compose..."
mkdir -p ~/archivebox
cd ~/archivebox
mkdir -p data
if [[ -f "./index.sqlite3" ]]; then
if [ -f "./index.sqlite3" ]; then
mv ~/archivebox/* ~/archivebox/data/
fi
curl -O 'https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/docker-compose.yml'
@ -21,7 +21,7 @@ elif (which docker > /dev/null && docker pull archivebox/archivebox); then
echo "[+] Initializing an ArchiveBox data folder at ~/archivebox using Docker..."
mkdir -p ~/archivebox
cd ~/archivebox
if [[ -f "./data/index.sqlite3" ]]; then
if [ -f "./data/index.sqlite3" ]; then
cd ./data
fi
docker run -v "$PWD":/data -it --rm archivebox/archivebox init --setup
@ -96,7 +96,7 @@ pip3 install --upgrade archivebox
echo "[+] Initializing ArchiveBox data folder at ~/archivebox..."
mkdir -p ~/archivebox
cd ~/archivebox
if [[ -f "./data/index.sqlite3" ]]; then
if [ -f "./data/index.sqlite3" ]; then
cd ./data
fi
exec archivebox init --setup