From d27d6c20c422a5673174849755112ca4587d0dcf Mon Sep 17 00:00:00 2001 From: Daniel Juarez Gonzalez <daniel.juarez.gonzalez@cern.ch> Date: Fri, 3 Apr 2020 15:05:54 +0000 Subject: [PATCH] Fix GitLab's tabs indentation --- bin/bscommitupdates | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/bin/bscommitupdates b/bin/bscommitupdates index f91b942..d34391c 100755 --- a/bin/bscommitupdates +++ b/bin/bscommitupdates @@ -81,25 +81,25 @@ done for DIST in $DISTS do for REPO in $REPOS - do + do case $REPO in - "testing") - ADV="/afs/cern.ch/project/linux/www/updates/$DIST/$TODAY-test.file" - REPO_DEST_PATH="updates/$DIST/test/" - ;; - "updates") - ADV="/afs/cern.ch/project/linux/www/updates/$DIST/$TODAY.file" - REPO_DEST_PATH="updates/$DIST/prod/" - ;; - *) - echo -e $ROUGE "*** $DIST/$REPO not configured to commit updates"; - continue - ;; - esac + "testing") + ADV="/afs/cern.ch/project/linux/www/updates/$DIST/$TODAY-test.file" + REPO_DEST_PATH="updates/$DIST/test/" + ;; + "updates") + ADV="/afs/cern.ch/project/linux/www/updates/$DIST/$TODAY.file" + REPO_DEST_PATH="updates/$DIST/prod/" + ;; + *) + echo -e $ROUGE "*** $DIST/$REPO not configured to commit updates"; + continue + ;; + esac # Use a temp directory that we later delete TMPDIR=$(mktemp -d) # This file would have already been generated by bsmailusers, we only use the production file - + if [ ! -s "$ADV" ]; then echo "There are no updates, no need to commit a file" exit 0 @@ -119,12 +119,12 @@ do i=1 while IFS= read -r LINE do - test $i -eq 1 && ((i=i+1)) && continue - # Split table variables to ease future css styling if needed, much more readable than one-liners - PACKAGE="$(echo $LINE | awk -F "</*td>|</*tr>" '/<\/*t[rd]>.*/ {print $5}')" - ADVTYPE="$(echo $LINE | awk -F "</*td>|</*tr>" '/<\/*t[rd]>.*/ {print $3}')" - ADVURL="$(echo $LINE | awk -F "</*td>|</*tr>" '/<\/*t[rd]>.*/ {print $7}')" - echo "$PACKAGE | $ADVTYPE $ADVURL | " >> "$TMPDIR"/.updates + test $i -eq 1 && ((i=i+1)) && continue + # Split table variables to ease future css styling if needed, much more readable than one-liners + PACKAGE="$(echo $LINE | awk -F "</*td>|</*tr>" '/<\/*t[rd]>.*/ {print $5}')" + ADVTYPE="$(echo $LINE | awk -F "</*td>|</*tr>" '/<\/*t[rd]>.*/ {print $3}')" + ADVURL="$(echo $LINE | awk -F "</*td>|</*tr>" '/<\/*t[rd]>.*/ {print $7}')" + echo "$PACKAGE | $ADVTYPE $ADVURL | " >> "$TMPDIR"/.updates done < $ADV echo >> "$TMPDIR"/.updates -- GitLab