]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
doxy: do not show whitespace diffs on bulk edit
authordberzano <dario.berzano@cern.ch>
Mon, 9 Feb 2015 17:36:50 +0000 (18:36 +0100)
committerdberzano <dario.berzano@cern.ch>
Tue, 10 Feb 2015 15:21:13 +0000 (16:21 +0100)
doxygen/debug/run.sh

index 6c8ec404e04690fc3d0e5790769ba4278a86866f..599e0f7265908ae471ff99fb455a3b7d6b7c6a2b 100755 (executable)
@@ -4,6 +4,12 @@ cd "${ALICE_ROOT}"/../src/
 
 [[ $EDITOR == '' ]] && EDITOR=vim
 
+function remove_trailing_whitespaces() {
+  F="$1"
+  cat "$F" | sed -e 's/\s*$//' > "$F".0
+  mv "$F".0 "$F"
+}
+
 # List of files from external source
 Files=$(
   cat "$(dirname "$0")"/list-of-files-to-process.txt | \
@@ -33,10 +39,6 @@ for F in ${Files[@]} ; do
     #./thtml2doxy.py $Stdout $Debug $( cat debug/includes.txt ) "$F"
     ./thtml2doxy.py $Stdout $Debug -I$ALICE_ROOT/include "$F"
     r=$?
-
-    # remove trailing whitespace
-    cat "$F" | sed -e 's/\s*$//' > "$F".0
-    mv "$F".0 "$F"
   fi
   if [[ $r != 0 ]] ; then
     echo -e "\033[31mFatal error at ${F}: stopping here\033[m"
@@ -56,10 +58,12 @@ for F in ${Files[@]} ; do
           "$EDITOR" "$F"
         ;;
         stage)
+          remove_trailing_whitespaces "$F"
           git add "$F" || exit 1
           break
         ;;
         parts)
+          remove_trailing_whitespaces "$F"
           git add -p "$F" || exit 1
           git checkout "$F" || exit 1
           echo -e "\033[35mPart of \033[34m${FNorm}\033[35m was staged, the rest was restored. Press \033[34mEnter\033[35m to continue.\033[m"