about summary refs log tree commit diff stats
path: root/cpp/relayout
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-17 11:04:58 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-17 11:04:58 -0700
commitc18e17f22feaf308376f53f2f61775ddad0e4a9d (patch)
tree73dac4575e99fae53434a52ed9642d9e2cf94ca3 /cpp/relayout
parentc495d2ac7ca0d7f1c1a9bbb7d1ad5072a7eface5 (diff)
downloadmu-c18e17f22feaf308376f53f2f61775ddad0e4a9d.tar.gz
1076
Diffstat (limited to 'cpp/relayout')
-rwxr-xr-xcpp/relayout7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/relayout b/cpp/relayout
index e0b38c4b..c99f418f 100755
--- a/cpp/relayout
+++ b/cpp/relayout
@@ -1,6 +1,9 @@
 #!/usr/bin/env zsh
 # Helper to change the numerical prefixes across the repo, say if you want to
 # create room between 023 and 024, and so on.
+#
+# Assumes there's only ever one file with any numeric prefix. If you move
+# 002trace.tests you might need to do some manual patch-up.
 
 setopt extendedglob
 
@@ -20,7 +23,7 @@ fi
 #
 
 index=0
-ls [0-9]* |grep -v "^002trace.tests$" |sort -n |perl -pwe 's/\..*//' |
+ls [0-9]* |grep -v "^002trace.tests$" |sort -n
   while read file
   do
     echo $file >&2
@@ -38,7 +41,7 @@ vim -c "set nu" .layout
 #
 
 root() {
-  echo $1 |perl -pwe 's/^[0-9]*//' |perl -pwe 's/\..*//'
+  echo $1 |perl -pwe 's/^[0-9]*//'
 }
 
 index=0