1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-05 21:02:42 +02:00
Files
gimp/tools/generate-news
Bruno Lopes fd47161215 gitlab, build, tools: Port bashisms to POSIX-compliant code
Although these scripts are not called by Meson, portability outside the
build system is always welcome (specially on macOS or non-GNU OSes).
2025-06-16 22:06:06 -03:00

35 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
# Copyright (C) 2015 Ville Pätsi <drc@gimp.org>
SCRIPT_FOLDER=$( cd "$( dirname "$0")" && pwd )
FIRST_COMMIT="$1"
[ -z "$FIRST_COMMIT" ] && FIRST_COMMIT="950412fbdc720fe2600f58f04f25145d9073895d" # First after tag 2.8.0
FOLDERS="app;tools;menus;etc \
libgimp;libgimpbase;libgimpcolor;libgimpconfig;libgimpmath;libgimpmodule;libgimpthumb;libgimpwidgets \
plug-ins \
modules \
build \
themes"
OUTPUTFILE=${SCRIPT_FOLDER}/../NEWS_since_"${FIRST_COMMIT}"
old_dir=$(pwd)
cd ${SCRIPT_FOLDER}/..
for folderloop in $FOLDERS; do
folderloop=$(echo "$folderloop" | sed "s/;/ /g")
uppercase_folderloop="`echo ${folderloop} | cut -c1 | tr '[:lower:]' '[:upper:]'``echo ${folderloop} | cut -c2-`"
printf "\n${uppercase_folderloop}:\n\n" >> "${OUTPUTFILE}"
for folder in $folderloop; do
git log --date-order --reverse --date=short --pretty=format:"- %h %s" "${FIRST_COMMIT}"..HEAD ${folder} >> "${OUTPUTFILE}"
done
printf "\n\n" >> "${OUTPUTFILE}"
done
cd $old_dir
echo "NEWS generated into ${OUTPUTFILE}"