aur/pre-commit
Thomas Mashos c8e262b0f6 Add hook to update SRCINFO and clean directories
Update to 2023.2.1.3
2023-08-04 16:40:29 -07:00

23 lines
No EOL
527 B
Bash
Executable file

#!/bin/sh
set -e
# update SRCINFO before committing
if [ "$(git config --bool aur.hook.srcinfo)" != "false" ]; then
echo "aur.hook.srcinfo: updating .SRCINFO ..."
makepkg --printsrcinfo > .SRCINFO
git add .SRCINFO
fi
# update SRCINFO before committing
if [ "$(git config --bool aur.hook.clean)" != "false" ]; then
echo "Cleaning directories"
rm -rf pkg
rm -rf src
rm -f RemoteDesktopManager_2022*
rm -f RemoteDesktopManager_2023*
rm -f remote-desktop-manager-2022*
rm -f remote-desktop-manager-2023*
fi