- commit
- 012fde8a61202aec1aba8be629e083fc1a8a3cd2
- parent
- da60fa023abe83254fcb031129bc4926496f5e78
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-03-29 19:06
rm unused files
Diffstat
D | example_create.sh | 43 | ------------------------------------------- |
D | example_post-receive.sh | 73 | ------------------------------------------------------------ |
D | favicon.png | 0 | |
D | logo.png | 0 | |
D | stagit.1 | 107 | ------------------------------------------------------------ |
5 files changed, 0 insertions, 223 deletions
diff --git a/example_create.sh b/example_create.sh
@@ -1,43 +0,0 @@1 -1 #!/bin/sh2 -1 # - Makes index for repositories in a single directory.3 -1 # - Makes static pages for each repository directory.4 -1 #5 -1 # NOTE, things to do manually (once) before running this script:6 -1 # - copy style.css, logo.png and favicon.png manually, a style.css example7 -1 # is included.8 -1 #9 -1 # - write clone url, for example "git://git.codemadness.org/dir" to the "url"10 -1 # file for each repo.11 -1 # - write owner of repo to the "owner" file.12 -1 # - write description in "description" file.13 -1 #14 -1 # Usage:15 -1 # - mkdir -p htmldir && cd htmldir16 -1 # - sh example_create.sh17 -118 -1 # path must be absolute.19 -1 reposdir="/var/www/domains/git.codemadness.nl/home/src"20 -1 curdir="$(pwd)"21 -122 -1 # make index.23 -1 stagit-index "${reposdir}/"*/ > "${curdir}/index.html"24 -125 -1 # make files per repo.26 -1 for dir in "${reposdir}/"*/; do27 -1 # strip .git suffix.28 -1 r=$(basename "${dir}")29 -1 d=$(basename "${dir}" ".git")30 -1 printf "%s... " "${d}"31 -132 -1 mkdir -p "${curdir}/${d}"33 -1 cd "${curdir}/${d}" || continue34 -1 stagit -c ".cache" "${reposdir}/${r}"35 -136 -1 # symlinks37 -1 ln -sf log.html index.html38 -1 ln -sf ../style.css style.css39 -1 ln -sf ../logo.png logo.png40 -1 ln -sf ../favicon.png favicon.png41 -142 -1 echo "done"43 -1 done
diff --git a/example_post-receive.sh b/example_post-receive.sh
@@ -1,73 +0,0 @@1 -1 #!/bin/sh2 -1 # generic git post-receive hook.3 -1 # change the config options below and call this script in your post-receive4 -1 # hook or symlink it.5 -1 #6 -1 # usage: $0 [name]7 -1 #8 -1 # if name is not set the basename of the current directory is used,9 -1 # this is the directory of the repo when called from the post-receive script.10 -111 -1 # NOTE: needs to be set for correct locale (expects UTF-8) otherwise the12 -1 # default is LC_CTYPE="POSIX".13 -1 export LC_CTYPE="en_US.UTF-8"14 -115 -1 name="$1"16 -1 if test "${name}" = ""; then17 -1 name=$(basename "$(pwd)")18 -1 fi19 -120 -1 # config21 -1 # paths must be absolute.22 -1 reposdir="/home/src/src"23 -1 dir="${reposdir}/${name}"24 -1 htmldir="/home/www/domains/git.codemadness.org/htdocs"25 -1 stagitdir="/"26 -1 destdir="${htmldir}${stagitdir}"27 -1 cachefile=".htmlcache"28 -1 # /config29 -130 -1 if ! test -d "${dir}"; then31 -1 echo "${dir} does not exist" >&232 -1 exit 133 -1 fi34 -1 cd "${dir}" || exit 135 -136 -1 # detect git push -f37 -1 force=038 -1 while read -r old new ref; do39 -1 test "${old}" = "0000000000000000000000000000000000000000" && continue40 -1 test "${new}" = "0000000000000000000000000000000000000000" && continue41 -142 -1 hasrevs=$(git rev-list "${old}" "^${new}" | sed 1q)43 -1 if test -n "${hasrevs}"; then44 -1 force=145 -1 break46 -1 fi47 -1 done48 -149 -1 # strip .git suffix.50 -1 r=$(basename "${name}")51 -1 d=$(basename "${name}" ".git")52 -1 printf "[%s] stagit HTML pages... " "${d}"53 -154 -1 mkdir -p "${destdir}/${d}"55 -1 cd "${destdir}/${d}" || exit 156 -157 -1 # remove commits and ${cachefile} on git push -f, this recreated later on.58 -1 if test "${force}" = "1"; then59 -1 rm -f "${cachefile}"60 -1 rm -rf "commit"61 -1 fi62 -163 -1 # make index.64 -1 stagit-index "${reposdir}/"*/ > "${destdir}/index.html"65 -166 -1 # make pages.67 -1 stagit -c "${cachefile}" "${reposdir}/${r}"68 -169 -1 ln -sf log.html index.html70 -1 ln -sf ../style.css style.css71 -1 ln -sf ../logo.png logo.png72 -173 -1 echo "done"
diff --git a/favicon.png b/favicon.png
Binary files differ.diff --git a/logo.png b/logo.png
Binary files differ.diff --git a/stagit.1 b/stagit.1
@@ -1,107 +0,0 @@1 -1 .Dd February 6, 20192 -1 .Dt STAGIT 13 -1 .Os4 -1 .Sh NAME5 -1 .Nm stagit6 -1 .Nd static git page generator7 -1 .Sh SYNOPSIS8 -1 .Nm9 -1 .Op Fl c Ar cachefile10 -1 .Op Fl l Ar commits11 -1 .Ar repodir12 -1 .Sh DESCRIPTION13 -1 .Nm14 -1 writes HTML pages for the repository15 -1 .Ar repodir16 -1 to the current directory.17 -1 .Pp18 -1 The options are as follows:19 -1 .Bl -tag -width Ds20 -1 .It Fl c Ar cachefile21 -1 Cache the entries of the log page up to the point of22 -1 the last commit.23 -1 The24 -1 .Ar cachefile25 -1 will store the last commit id and the entries in the HTML table.26 -1 It is up to the user to make sure the state of the27 -1 .Ar cachefile28 -1 is in sync with the history of the repository.29 -1 .It Fl l Ar commits30 -1 Write a maximum number of31 -1 .Ar commits32 -1 to the log.html file only.33 -1 However the commit files are written as usual.34 -1 .El35 -1 .Pp36 -1 The options37 -1 .Fl c38 -1 and39 -1 .Fl l40 -1 cannot be used at the same time.41 -1 .Pp42 -1 The following files will be written:43 -1 .Bl -tag -width Ds44 -1 .It atom.xml45 -1 Atom XML feed46 -1 .It files.html47 -1 List of files in the latest tree, linking to the file.48 -1 .It log.html49 -1 List of commits in reverse chronological applied commit order, each commit50 -1 links to a page with a diffstat and diff of the commit.51 -1 .It refs.html52 -1 Lists references of the repository such as branches and tags.53 -1 .El54 -1 .Pp55 -1 For each entry in HEAD a file will be written in the format:56 -1 file/filepath.html.57 -1 This file will contain the textual data of the file prefixed by line numbers.58 -1 The file will have the string "Binary file" if the data is considered to be59 -1 non-textual.60 -1 .Pp61 -1 For each commit a file will be written in the format:62 -1 commit/commitid.html.63 -1 This file will contain the diffstat and diff of the commit.64 -1 It will write the string "Binary files differ" if the data is considered to65 -1 be non-textual.66 -1 Too large diffs will be suppressed and a string67 -1 "Diff is too large, output suppressed" will be written.68 -1 .Pp69 -1 When a commit HTML file exists it won't be overwritten again, note that if70 -1 you've changed71 -1 .Nm72 -1 or changed one of the metadata files of the repository it is recommended to73 -1 recreate all the output files because it will contain old data.74 -1 To do this remove the output directory and75 -1 .Ar cachefile ,76 -1 then recreate the files.77 -1 .Pp78 -1 The basename of the directory is used as the repository name.79 -1 The suffix ".git" is removed from the basename, this suffix is commonly used80 -1 for "bare" repos.81 -1 .Pp82 -1 The content of the follow files specifies the metadata for each repository:83 -1 .Bl -tag -width Ds84 -1 .It .git/description or description (bare repo).85 -1 description86 -1 .It .git/owner or owner (bare repo).87 -1 owner of repository88 -1 .It .git/url or url (bare repo).89 -1 primary clone url of the repository, for example: git://git.2f30.org/stagit90 -1 .El91 -1 .Pp92 -1 When a README or LICENSE file exists in HEAD or a .gitmodules submodules file93 -1 exists in HEAD a direct link in the menu is made.94 -1 .Pp95 -1 For changing the style of the page you can use the following files:96 -1 .Bl -tag -width Ds97 -1 .It favicon.png98 -1 favicon image.99 -1 .It logo.png100 -1 32x32 logo.101 -1 .It style.css102 -1 CSS stylesheet.103 -1 .El104 -1 .Sh SEE ALSO105 -1 .Xr stagit-index 1106 -1 .Sh AUTHORS107 -1 .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org