docs/dirtyCheck.sh
Elisamara Aoki Goncalves 003d5d4439 Improved Subcloud Deployment / Upgrading Error Reporting (GUI & CLI)
Add new items with example to sections.
Add new example figure.
Fix numbering.
Resize figures to fit the page.
Update log files name.
Add item 4 in include file.
RS> Conditionalize 'dcmanager subcloud list' states for
    various run scenarios
RS> Move step from .. only:: block to .. include::
RS> Pre-process included blocks in non-block context
RS> Remove debug message from script
EG> Added example
EG> Fixed caution box

Story: 2010271
Task: 46946

Signed-off-by: Elisamara Aoki Goncalves <elisamaraaoki.goncalves@windriver.com>
Change-Id: I3791a23fefba8d9d428ae208b3bfcb9274d49278
2022-12-15 13:31:33 -03:00

22 lines
489 B
Bash
Executable File

#!/bin/bash
RED='\033[0;31m'
NC='\033[0m' # No Color
declare -a dirtyFiles
dirtyFiles=( $(git status --porcelain doc/source 2>/dev/null) )
echo "Checking status of doc/source"
if [ ${#dirtyFiles[@]} -ne 0 ]; then
echo -e "${RED}Repo is dirty. Please stash, add or manually delete the following files:${NC}"
for file in ${dirtyFiles[@]};
do
if [[ ${file} == "??" ]]; then continue; fi
echo -e "${RED}$file${NC}"
done
exit 1
else
echo "... OK"
fi