#!/bin/bash # Resolve (delete) a bug by ID if [ -z "$1" ]; then echo "Usage: resolve-bug " exit 1 fi BUG_ID="$1" # Show the bug being resolved echo "Resolving bug #$BUG_ID:" ssh titanium "sqlite3 -column /site/doot.terst.org/data/dashboard.db \"SELECT description FROM bugs WHERE id = $BUG_ID\"" # Delete the bug ssh titanium "sqlite3 /site/doot.terst.org/data/dashboard.db \"DELETE FROM bugs WHERE id = $BUG_ID\"" if [ $? -eq 0 ]; then echo "Bug #$BUG_ID resolved." else echo "Failed to resolve bug #$BUG_ID" exit 1 fi