1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-10-27 05:24:17 -04:00
picom/make-release.sh
Richard Grenville 25b217ff52 Misc: Move shared functions out of make-release.sh
- Move shared functions in make-release.sh to a separate file,
   functions.sh .

 - Add more comments to make-release.sh and functions.sh .
2015-01-11 16:26:36 +08:00

26 lines
608 B
Bash
Executable file

#!/bin/bash
# Make a release source tarball containing pre-built documentation
BASE_DIR=$(dirname "$0")
. "${BASE_DIR}/functions.sh"
main() {
TMP=/tmp
mkdir -p "${TMP}"
VER="$(make version)"
P="compton-${VER}"
git archive --format=tar -o "${TMP}/${P}.tar" --prefix="${P}/" HEAD || die
cd "${TMP}" || die
tar xf "${TMP}/${P}.tar" || die
sed -i "s/\(COMPTON_VERSION ?=\).*/\1 ${VER}/" "${P}/Makefile" || die
cd "${P}" || die
make docs || die
cd .. || die
tar cJf "${P}.tar.xz" "${P}" || die
rm -r "${P}" "${P}.tar" || die
einfo Archive is now on $(realpath ${P}.tar.xz)
}
main