Something went wrong. Try again.
A fast and easy to use app to manage a physical music collection
Something went wrong. Try again.
919 B · 48 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849#!/usr/bin/env bash
#MISE description="Open an SQLite console to the development database with extensions loaded"
set -e
source "$(git rev-parse --show-toplevel)/scripts/_helpers.sh"
ensure_working_directory!
# Detect platformarch=$(uname -m)os=$(uname -s)
case "$os" in Darwin) case "$arch" in x86_64) platform="darwin-amd64" ;; arm64) platform="darwin-arm64" ;; esac ;; Linux) case "$arch" in x86_64) platform="linux-amd64" ;; aarch64) platform="linux-arm64" ;; esac ;; *) echo "Unsupported OS: $os" exit 1 ;;esac
ext_dir="priv/sqlite_extensions/$platform"
sqlite_cmd="sqlite3"
if command -v rlwrap &> /dev/null; then sqlite_cmd="rlwrap sqlite3"else echo "Tip: install rlwrap for arrow key and history support" echo ""fi
$sqlite_cmd \ -cmd ".load $ext_dir/unicode" \ -cmd ".load $ext_dir/vec0" \ data/music_library_dev.db