add --todo flag

This commit is contained in:
2025-12-23 16:49:05 +02:00
parent 31af274b5b
commit bca9dbe2c2

View File

@@ -3,6 +3,10 @@ copyEnv() {
echo "Copied $1"
}
todoSearch() {
rg "ltodo" -g "!*.sh" || true # ignore error code and bypass set -e
}
if [ "$1" = "--db" ]; then
# Proxy database to localhost
copyEnv DB_DATABASE
@@ -13,6 +17,8 @@ if [ "$1" = "--db" ]; then
sshpass -p "$SERVER_PASSWORD" \
ssh -L 3306:localhost:3306 $SERVER_USER@$SERVER_HOST
elif [ "$1" = "--git" ]; then
todoSearch
# Run lazygit on server
sshpass -p "$SERVER_PASSWORD" \
ssh -t $SERVER_USER@$SERVER_HOST \
@@ -20,6 +26,8 @@ elif [ "$1" = "--git" ]; then
# After that sync remote with --delete flag
bash remote-local.sh --delete
elif [ "$1" = "--todo" ]; then
todoSearch
else
sshpass -p "$SERVER_PASSWORD" \
ssh -t $SERVER_USER@$SERVER_HOST \