SPB Git

spb/firc0001_uqo

Public
670 B · 14 lines shellscript
1#!/bin/bash2# Run one audit script on M3U96b in the background under nice, with a log and a done-marker.3# usage: run_one.sh <script.py|script.sh> [args...]   (from ~/firc0001_review)4set -u5cd "$HOME/firc0001_review"6S="$1"; shift7NAME=$(basename "$S" | sed -E 's/\.(py|sh)$//')8LOG="logs/$NAME.log"; DONE="logs/$NAME.done"9rm -f "$DONE"10PY="$HOME/UQO_RESEARCH_DB/.venv/bin/python"11if [[ "$S" == *.sh ]]; then CMD="bash scripts/$S $*"; else CMD="$PY -I scripts/$S $*"; fi12nohup bash -c "echo START \$(date -Iseconds); nice -n 10 env OMP_NUM_THREADS=4 FIRC_THREADS=4 $CMD; echo RC=\$? END \$(date -Iseconds) > $DONE" > "$LOG" 2>&1 &13echo "started $NAME pid=$! log=$LOG"14
Files · 7680606bd9e55e762addcd60aa1be8e9689817bf
Menu

Theme