28 lines
627 B
Bash
Executable file
28 lines
627 B
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
PKG_NAME="Insthidge"
|
|
DST_DIR="slidge-insthidge"
|
|
SRC_URL="https://codeberg.org/slidge/legacy-module-template.git"
|
|
|
|
if ! which pipx; then
|
|
echo "pipx not found"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p $DST_DIR
|
|
|
|
# Run Copier
|
|
cp .copier-answers.yml $DST_DIR
|
|
pipx run copier copy -w -l $SRC_URL $DST_DIR
|
|
|
|
# Replace generated environment with work tree
|
|
rm -r $DST_DIR/$PKG_NAME
|
|
cp -r $PWD/$PKG_NAME/. $DST_DIR/$PKG_NAME
|
|
sed -i "s# - ./$PKG_NAME:/build/$PKG_NAME# - $PWD/$PKG_NAME:/build/$PKG_NAME#g" $DST_DIR/docker-compose.yml
|
|
|
|
mkdir -p persistent
|
|
ln -s $PWD/persistent $DST_DIR/persistent
|
|
|
|
pushd $DST_DIR
|
|
git init .
|
|
popd
|