#!/bin/sh
echo "pre-commit: Refreshing packwiz"
cd src
packwiz refresh
echo "pre-commit: Adding changes to git"
git add .
echo "pre-commit: Amending commit with refreshed files"
PREV_COMMIT=$(git rev-parse HEAD)
git commit --no-edit --no-verify --reuse-message="$PREV_COMMIT"
echo "pre-commit: Done"