Skip to content

Commit f060e7b

Browse files
committed
Remove gdb
1 parent b4292dc commit f060e7b

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

bin/switch

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ function show_usage {
66
echo "Usage: switch [OPTIONS] [PROFILE]"
77
echo
88
echo "Options:"
9-
echo " --brew Run brew bundle after successful switch"
10-
echo " --no-gc Skip running nix garbage collection"
11-
echo " --help Show this help message"
9+
echo " --brew Run brew bundle after successful switch"
10+
echo " --no-gc Skip running nix garbage collection"
11+
echo " --skip-todos Allow switch even if TODO comments exist"
12+
echo " --help Show this help message"
1213
echo
1314
echo "If PROFILE is not specified, username@hostname will be used."
1415
exit 0
@@ -17,6 +18,7 @@ function show_usage {
1718
# Parse command line arguments
1819
RUN_BREW=true
1920
RUN_GC=true
21+
SKIP_TODOS=false
2022
PROFILE=""
2123
TRACE=""
2224
FAST=false
@@ -42,6 +44,10 @@ while [[ $# -gt 0 ]]; do
4244
FAST=true
4345
shift
4446
;;
47+
--skip-todos)
48+
SKIP_TODOS=true
49+
shift
50+
;;
4551
*)
4652
PROFILE="$1"
4753
shift
@@ -52,13 +58,26 @@ done
5258
if [ "$FAST" = true ]; then
5359
RUN_GC=false
5460
RUN_BREW=false
61+
SKIP_TODOS=true
5562
fi
5663

5764
# Use default profile if none specified
5865
if [ -z "$PROFILE" ]; then
5966
PROFILE="$(whoami)@$(hostname -s)"
6067
fi
6168

69+
# Check for TODO comments
70+
if [ "$SKIP_TODOS" = false ]; then
71+
TODO_FILES=$(grep -rl --exclude-dir=.git "TODO" . 2>/dev/null || true)
72+
if [ -n "$TODO_FILES" ]; then
73+
echo "Error: TODO comments found in the following files:"
74+
echo "$TODO_FILES"
75+
echo
76+
echo "Resolve the TODOs or use --skip-todos to proceed anyway."
77+
exit 1
78+
fi
79+
fi
80+
6281
echo "Switching to profile: $PROFILE"
6382

6483
# Run home-manager with the selected profile

modules/shell.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ in
5353
libyaml.dev
5454
jq
5555
direnv
56-
gdb
5756

5857
# Nix tools
5958
nix-prefetch

0 commit comments

Comments
 (0)