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-10-27 15:05:00 +00:00
|
|
|
mkdir -p "${_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}"
|
2016-10-27 15:05:00 +00:00
|
|
|
ln -srf ../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 05:11:17 +00:00
|
|
|
LAST_STABLE_RELEASE=$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1))
|
2016-10-23 00:29:07 +00:00
|
|
|
LAST_MAJOR_MINOR="${LAST_STABLE_RELEASE%.*}"
|
2016-10-23 05:11:17 +00:00
|
|
|
|
|
|
|
LAST_MAJOR="${LAST_STABLE_RELEASE%%.*}"
|
|
|
|
LAST_MINOR="${LAST_MAJOR_MINOR#*.}"
|
2016-10-23 00:29:07 +00:00
|
|
|
LAST_PATCH="${LAST_STABLE_RELEASE##*.}"
|
|
|
|
|
2016-10-23 05:11:17 +00:00
|
|
|
case "${PWD##*/}" in
|
2016-11-14 22:22:11 +00:00
|
|
|
numix-gtk-theme)
|
2016-10-23 05:11:17 +00:00
|
|
|
NEXT_PATCH=$(($LAST_PATCH + 1))
|
|
|
|
|
|
|
|
NEXT_STABLE_RELEASE="${LAST_MAJOR_MINOR}.${NEXT_PATCH}"
|
|
|
|
;;
|
|
|
|
|
|
|
|
Numix-Frost)
|
|
|
|
LAST_MAJOR=$(($LAST_MAJOR + 1))
|
|
|
|
NEXT_STABLE_RELEASE="${LAST_MAJOR}.${LAST_MINOR}.${LAST_PATCH}"
|
|
|
|
LAST_PATCH=$(($LAST_PATCH - 1))
|
|
|
|
|
|
|
|
LAST_STABLE_RELEASE="${LAST_MAJOR}.${LAST_MINOR}.${LAST_PATCH}"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo 'Unknown directory!' && exit 1
|
|
|
|
;;
|
|
|
|
esac
|
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
|