Many bash functions are duplicated across scripts. This commit consolidates them on one file for more efficient managment. Some incidental updates were made: - set default start date in pickCompare to today-9 months instead of 2020-01-01. This reduces clutter when selecting authors and stale gerrits in output. - fix a routine used by normalize-includes Signed-off-by: Ron Stone <ronald.stone@windriver.com> Change-Id: Ifd64e38fbe4324c7d6b4eccb725ef3d8367f6578
		
			
				
	
	
		
			23 lines
		
	
	
		
			583 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			583 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
. $(pwd)/_utils.sh
 | 
						|
if [[ -z ${utils_loaded+x} ]]; then echo "Could not load utilities"; exit 1; fi
 | 
						|
 | 
						|
declare -a dirtyFiles
 | 
						|
 | 
						|
dirtyFiles=( $(git status --porcelain doc/source 2>/dev/null) )
 | 
						|
 | 
						|
message "Checking status of doc/source"
 | 
						|
 | 
						|
if [ ${#dirtyFiles[@]} -ne 0 ]; then
 | 
						|
    warn "Repo is dirty. Please stash, add or manually delete the following files:\n"
 | 
						|
    for file in ${dirtyFiles[@]};
 | 
						|
    do
 | 
						|
        if [[ ${file} == "??" ]]; then continue; fi
 | 
						|
        if [[ ${file} == "M" ]]; then continue; fi
 | 
						|
        warn "$file"
 | 
						|
    done
 | 
						|
    exit 1
 | 
						|
else
 | 
						|
    confirmation "... OK"
 | 
						|
fi |