diff options
author | Didier Raboud <odyx@debian.org> | 2014-07-31 07:51:56 +0000 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2014-07-31 07:51:56 +0000 |
commit | e47c327668d8c5437b6f46cd7eee772d238b3769 (patch) | |
tree | 69177fa723ff3fcdb65a153a2b7e968aa5af50a9 /bin/gen-DLA | |
parent | 3d055146418b7f928fb324326963afb34023c8b8 (diff) |
Adapt bin/gen-DLA to let DLA's always read as DLA-####-#
- Amend DLA subject to have the first dash
- Patch bin/gen-DLA to zero-pad the DLAid to 4 digits
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28008 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/gen-DLA')
-rwxr-xr-x | bin/gen-DLA | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/gen-DLA b/bin/gen-DLA index a2f57f09c9..1284847cc4 100755 --- a/bin/gen-DLA +++ b/bin/gen-DLA @@ -222,10 +222,10 @@ fi if [ -z "$DLAID" ]; then latest_dla="$(sed -nr '/DLA-[0-9]+-1/{s/^.+DLA-[0]*([0-9]+).*$/\1/;p;q}' data/DLA/list)" - dla=$(($latest_dla+1)) + dla=$(printf '%04d' $(($latest_dla+1))) c=0 while dla_exists "$dla-1"; do - dla=$(($dla+1)) + dla=$(printf '%04d' $(($dla+1))) c=$(($c+1)) if [ $c -eq 10 ]; then error "unable to find an unused DLA id after $c attempts" >&2 |