diff options
author | Michael Reifenberger <mr@FreeBSD.org> | 2018-01-12 20:12:44 +0000 |
---|---|---|
committer | Michael Reifenberger <mr@FreeBSD.org> | 2018-01-12 20:12:44 +0000 |
commit | 3d96bddf91a28dcff62d6abbe3dd17982d8e5e36 (patch) | |
tree | e7e53908a6567ae4809181fa1bcb8a898cb3a7a9 /cad/kicad-library-devel/files | |
parent | 187f9d8ad93b0d5d01f98f9cd2d03dda59939cae (diff) | |
download | ports-3d96bddf91a28dcff62d6abbe3dd17982d8e5e36.tar.gz ports-3d96bddf91a28dcff62d6abbe3dd17982d8e5e36.zip |
Notes
Diffstat (limited to 'cad/kicad-library-devel/files')
-rw-r--r-- | cad/kicad-library-devel/files/newVersion.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/cad/kicad-library-devel/files/newVersion.sh b/cad/kicad-library-devel/files/newVersion.sh new file mode 100644 index 000000000000..88c812ff2216 --- /dev/null +++ b/cad/kicad-library-devel/files/newVersion.sh @@ -0,0 +1,42 @@ +#!/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-library" ]; then + git clone https://github.com/KiCad/kicad-library.git -b master "${CURDIR}/kicad-library"; +else + cd "${CURDIR}/kicad-library" + git pull; +fi + +#if [ \! -d "${CURDIR}/kicad-repo" ]; then +# git clone https://git.launchpad.net/kicad -b master "${CURDIR}/kicad-repo"; +#else +# cd "${CURDIR}/kicad-repo" +# git pull https://git.launchpad.net/kicad; +#fi + +cd "${CURDIR}/kicad-library" +GIT_SRC_HASH=`git log -n 1 --pretty=format:"%H"`; +GIT_SRC_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_SRC_HASH, $GIT_SRC_DATE" +echo "GIT_SRC_HASH= ${GIT_SRC_HASH}" > ${CURDIR}/Makefile.git_rev +echo "GIT_SRC_DATE= ${GIT_SRC_DATE}" >> ${CURDIR}/Makefile.git_rev + +#mkdir -p "${WRKDIR}/kicad-library-master" +#mkdir -p "${WRKDIR}/kicad-r${GIT_SRC_DATE}" +#cd "${CURDIR}/kicad-repo" +#find . -type d -name .git -prune -o -print | cpio -pdamuv "${WRKDIR}/kicad-r${GIT_SRC_DATE}"; +#cd "${CURDIR}/kicad-library" +#find . -type d -name .git -prune -o -print | cpio -pdamuv "${WRKDIR}/kicad-library-master" +#cd "${WRKDIR}" +#tar cvfy /usr/ports/distfiles/kicad/kicad-r${GIT_SRC_DATE}.tar.bz2 \ +# kicad-r${GIT_SRC_DATE} kicad-library-master |