From bcce1065d983a072854157085dfc028b0fcc4dd9 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 25 Jan 2026 11:08:56 +0100 Subject: feat(workstation): add rsqlite script --- nixos/profiles/workstation/scripts/rsqlite | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 nixos/profiles/workstation/scripts/rsqlite (limited to 'nixos/profiles') diff --git a/nixos/profiles/workstation/scripts/rsqlite b/nixos/profiles/workstation/scripts/rsqlite new file mode 100755 index 0000000..d9dc2ae --- /dev/null +++ b/nixos/profiles/workstation/scripts/rsqlite @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +if [[ "$#" != 2 && "$#" != "3" ]]; then + echo "usage: $0 [sql]" + exit 1 +fi + +printf -v path %q "$2" + +if [[ "$#" == "3" ]]; then + printf -v sql %q "$3" +else + sql="" +fi + +ssh "$1" -t "sudo su -c 'sqlite3 /var/lib/$path $sql'" -- cgit v1.3.1