1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00
freebsd-ports/cad/kicad-library-templates-devel/files/newVersion.sh
2018-07-28 09:49:26 +00:00

26 lines
886 B
Bash

#!/bin/sh
#GIT_SRC_HASH=`cd kicad-repo; git log -n 1 --pretty=format:"%H"`
#GIT_SRC_DATE=`cd kicad-repo; git log -n 1 --date=iso-local -n 1 --pretty=format:"%cd" | \
# cut -c '1-19' | sed -e 's,-,,g' -e 's,:,,g' -e 's, ,,g'`
CURDIR=`pwd`
WRKDIR=`pwd`/work
#mkdir -p "${WRKDIR}"
if [ \! -d "${CURDIR}/kicad-templates" ]; then
git clone https://github.com/KiCad/kicad-templates.git -b master "${CURDIR}/kicad-templates";
else
cd "${CURDIR}/kicad-templates"
git pull;
fi
cd "${CURDIR}/kicad-templates"
GIT_TMPL_HASH=`git log -n 1 --pretty=format:"%H"`;
GIT_TMPL_DATE=`git log -n 1 --date=iso-local -n 1 --pretty=format:"%cd" | \
cut -c '1-19' | sed -e 's,-,,g' -e 's,:,,g' -e 's, ,,g'`
echo "$GIT_TMPL_HASH, $GIT_TMPL_DATE"
echo "GIT_TMPL_HASH= ${GIT_TMPL_HASH}" > ${CURDIR}/Makefile.git_rev
echo "GIT_TMPL_DATE= ${GIT_TMPL_DATE}" >> ${CURDIR}/Makefile.git_rev