4 REPOSRC=/worksrc/sysresccd-src
5 NEWDATE=$(date --date='1 days ago' '+%Y%m%d')
10 Usage: ${PROG} [options] [NEWDATE]
12 Replace the snapshot date in REPOSRC/mainfiles/*.spec with NEWDATE (defaults
16 -h|--help Display this screen and exit
17 -r REPOSRC Location of git systemrescuecd repo ($REPOSRC)
21 while getopts "r:" Option
24 r ) REPOSRC="$OPTARG";;
25 * ) usage; exit 1;; # Default, handles -h
28 shift $(($OPTIND - 1))
30 if [ "${1}" == "--help" ]
41 for f in ${REPOSRC}/mainfiles/sysresccd-*.spec
43 sed -i -e "s!^snapshot: [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]!snapshot: ${NEWDATE}!g" ${f}
46 grep '^snapshot: ' ${REPOSRC}/mainfiles/sysresccd-*.spec