2016-09-18 09:14:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-09-18 10:50:46 +00:00
|
|
|
do_install() {
|
|
|
|
local GTKDIR GTK320DIR GTKVER INSTALL_DIR
|
|
|
|
INSTALL_DIR="$1"
|
|
|
|
GTKDIR="${INSTALL_DIR}/gtk-3.0"
|
|
|
|
GTK320DIR="${INSTALL_DIR}/gtk-3.20"
|
|
|
|
|
|
|
|
install -dm755 "${INSTALL_DIR}"
|
2016-09-22 03:06:03 +00:00
|
|
|
|
|
|
|
cd src
|
|
|
|
|
2016-09-18 11:01:08 +00:00
|
|
|
cp index.theme "${INSTALL_DIR}"
|
2016-09-18 10:50:46 +00:00
|
|
|
|
2016-10-23 01:18:42 +00:00
|
|
|
cp -rt "${INSTALL_DIR}" \
|
|
|
|
assets gtk-2.0 metacity-1 openbox-3 xfce-notify-4.0 xfwm4 unity
|
|
|
|
|
2016-09-18 10:50:46 +00:00
|
|
|
for _DIR in "${GTKDIR}" "${GTK320DIR}"
|
|
|
|
do
|
|
|
|
GTKVER="${_DIR##*/}"
|
|
|
|
|
2016-09-22 03:06:03 +00:00
|
|
|
mkdir "${_DIR}"
|
2016-09-18 11:01:08 +00:00
|
|
|
|
2016-10-23 01:18:42 +00:00
|
|
|
cp -t "${_DIR}" \
|
2016-09-21 19:51:54 +00:00
|
|
|
"${GTKVER}/gtk.css" \
|
|
|
|
"${GTKVER}/gtk-dark.css" \
|
2016-09-18 10:50:46 +00:00
|
|
|
"${GTKVER}/gtk.gresource" \
|
2016-09-18 11:01:08 +00:00
|
|
|
"${GTKVER}/thumbnail.png"
|
|
|
|
|
2016-09-22 03:06:03 +00:00
|
|
|
cd "${_DIR}"
|
|
|
|
ln -sr ../assets assets
|
2016-09-18 11:01:08 +00:00
|
|
|
cd -
|
2016-09-18 10:50:46 +00:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-22 04:13:08 +00:00
|
|
|
output_changes_file_version_marker() {
|
|
|
|
|
|
|
|
line() {
|
|
|
|
dashes="$(printf '%0.s-' $(seq 1 13))"
|
|
|
|
echo "${dashes}>>>> $1 <<<<${dashes}"
|
|
|
|
}
|
|
|
|
|
|
|
|
tag_line="$(line $1)"
|
|
|
|
|
|
|
|
echo "-${tag_line}${tag_line}${tag_line}-"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-18 09:14:33 +00:00
|
|
|
update_changes_file() {
|
2016-10-23 00:29:07 +00:00
|
|
|
local LAST_STABLE_RELEASE NEXT_STABLE_RELEASE
|
|
|
|
|
|
|
|
LAST_STABLE_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1))
|
|
|
|
|
|
|
|
LAST_MAJOR_MINOR="${LAST_STABLE_RELEASE%.*}"
|
|
|
|
LAST_PATCH="${LAST_STABLE_RELEASE##*.}"
|
|
|
|
|
|
|
|
NEXT_PATCH=$(($LAST_PATCH + 1))
|
|
|
|
NEXT_STABLE_RELEASE="${LAST_MAJOR_MINOR}.${NEXT_PATCH}"
|
2016-09-18 09:14:33 +00:00
|
|
|
|
|
|
|
[[ -f CHANGES ]] && mv CHANGES CHANGES.old
|
|
|
|
|
2016-10-23 00:29:07 +00:00
|
|
|
output_changes_file_version_marker "${NEXT_STABLE_RELEASE}" > CHANGES
|
2016-09-22 04:13:08 +00:00
|
|
|
|
2016-09-18 09:14:33 +00:00
|
|
|
{ git log \
|
|
|
|
--pretty=format:"[%ai] %<(69,trunc) %s %><(15) %aN {%h}" \
|
2016-10-23 00:29:07 +00:00
|
|
|
--cherry-pick "${LAST_STABLE_RELEASE}...HEAD"; } >> CHANGES
|
2016-09-22 04:13:08 +00:00
|
|
|
|
2016-09-18 09:14:33 +00:00
|
|
|
|
2016-09-22 04:13:08 +00:00
|
|
|
[[ -f CHANGES.old ]] && echo "" >> CHANGES && cat CHANGES.old >> CHANGES && rm CHANGES.old
|
2016-09-18 09:14:33 +00:00
|
|
|
|
2016-10-23 00:29:07 +00:00
|
|
|
git add CHANGES
|
|
|
|
git commit -m 'RELEASE PREP :: Update CHANGES file.'
|
|
|
|
git push
|
2016-09-18 09:14:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-18 10:50:46 +00:00
|
|
|
|
2016-09-18 09:14:33 +00:00
|
|
|
case $1 in
|
|
|
|
changes)
|
|
|
|
update_changes_file
|
|
|
|
exit $?
|
|
|
|
;;
|
|
|
|
|
2016-09-18 10:50:46 +00:00
|
|
|
install)
|
|
|
|
do_install "$2"
|
|
|
|
;;
|
|
|
|
|
2016-09-18 09:14:33 +00:00
|
|
|
*)
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|