12 lines
296 B
Bash
Executable file
12 lines
296 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -x
|
|
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 --reuse-message="$PREV_COMMIT"
|
|
echo "pre-commit: Done"
|