Annotation of /trunk/publicsuffix-list/make-git-snapshot.sh
Parent Directory | Revision Log
Revision 3274 -
(hide annotations)
(download)
(as text)
Wed Jan 2 14:19:28 2019 UTC (5 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 440 byte(s)
Wed Jan 2 14:19:28 2019 UTC (5 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 440 byte(s)
-added git fetch script
1 | niro | 3274 | #!/bin/sh |
2 | |||
3 | # Usage: ./make-git-snapshot.sh [COMMIT] | ||
4 | # | ||
5 | # to make a snapshot of the given tag/branch. Defaults to HEAD. | ||
6 | |||
7 | DIRNAME=publicsuffix-list-$( date +%Y%m%d ) | ||
8 | |||
9 | echo DIRNAME ${DIRNAME} | ||
10 | echo HEAD ${1:-HEAD} | ||
11 | |||
12 | rm -rf ${DIRNAME} | ||
13 | |||
14 | # checkout mplayer | ||
15 | git clone git://github.com/publicsuffix/list ${DIRNAME} | ||
16 | |||
17 | GIT_DIR=${DIRNAME}/.git git archive --format=tar --prefix=${DIRNAME}/ ${1:-HEAD} \ | ||
18 | | bzip2 > ${DIRNAME}.tar.bz2 | ||
19 | |||
20 | # rm -rf ${DIRNAME} |