#!/bin/bash # Filespot CLI installer # Usage: curl -sL https://filespot.42b.eu/install/setup.sh | bash set -euo pipefail FILESPOT_DIR="$HOME/.local/share/filespot" BIN_DIR="$HOME/.local/bin" BASE_URL="https://filespot.42b.eu" echo "Installing filespot CLI from $BASE_URL ..." mkdir -p "$FILESPOT_DIR/lib" "$BIN_DIR" curl -sfL "$BASE_URL/install/filespot.mjs" -o "$FILESPOT_DIR/filespot.mjs" curl -sfL "$BASE_URL/install/lib/auth.mjs" -o "$FILESPOT_DIR/lib/auth.mjs" curl -sfL "$BASE_URL/install/lib/api.mjs" -o "$FILESPOT_DIR/lib/api.mjs" curl -sfL "$BASE_URL/install/lib/optimize.mjs" -o "$FILESPOT_DIR/lib/optimize.mjs" curl -sfL "$BASE_URL/install/package.json" -o "$FILESPOT_DIR/package.json" chmod +x "$FILESPOT_DIR/filespot.mjs" # Symlink into PATH ln -sf "$FILESPOT_DIR/filespot.mjs" "$BIN_DIR/filespot" echo "" echo "Installed filespot to $BIN_DIR/filespot" echo "Make sure $BIN_DIR is in your PATH, then run:" echo "" echo " filespot init $BASE_URL" echo "" # Version info DEPLOY_COMMIT="cb35f6e" DEPLOY_TIME="2026-04-22T13:09:34Z" CLI_VERSION="1.0.1" echo "Version: $CLI_VERSION (deploy $DEPLOY_COMMIT, $DEPLOY_TIME)"