From c18e17f22feaf308376f53f2f61775ddad0e4a9d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 17 Apr 2015 11:04:58 -0700 Subject: 1076 --- cpp/relayout | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cpp/relayout') 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 -- cgit 1.4.1-2-gfad0