[[ $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 | \
#./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"
"$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"