Fix scripts

This commit is contained in:
ItsDrike 2022-05-15 00:28:12 +02:00
parent d1aff0ec53
commit cd306cd6c6
No known key found for this signature in database
GPG key ID: B014E761034AF742
2 changed files with 16 additions and 8 deletions

View file

@ -1,8 +1,8 @@
source ./scripts/common.sh source ./scripts/common.sh
rm -rf "$STATIC_BUILD" rm -rf "$STATIC_BUILD"
rm -rf "$OUTPUT_DIR" rm -rf "$OUTPUT_DIR"
rm -rf "$BASEDIR/resources"
mkdir -p "$STATIC_BUILD" mkdir -p "$STATIC_BUILD"
@ -11,14 +11,17 @@ cp -r "$STATIC_SRC/img"/* "$STATIC_BUILD/img"
mkdir -p "$STATIC_BUILD/js" mkdir -p "$STATIC_BUILD/js"
cp -r "$STATIC_SRC/js"/* "$STATIC_BUILD/js" cp -r "$STATIC_SRC/js"/* "$STATIC_BUILD/js"
cp $BASEDIR/node_modules/jquery/dist/jquery.min.js $STATIC_BUILD/js/jquery.min.js cp "$BASEDIR/node_modules/jquery/dist/jquery.min.js" "$STATIC_BUILD/js/jquery.min.js"
cp $BASEDIR/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js $STATIC_BUILD/js/bootstrap.min.js cp "$BASEDIR/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" "$STATIC_BUILD/js/bootstrap.min.js"
mkdir -p "$STATIC_BUILD/css" mkdir -p "$STATIC_BUILD/css"
#cp -r "$STATIC_SRC/css"/* "$STATIC_BUILD/css" #cp -r "$STATIC_SRC/css"/* "$STATIC_BUILD/css"
cp -r "$BASEDIR/node_modules/@fortawesome/fontawesome-free/css/all.min.css" "$STATIC_BUILD/css/font-awesome.css" cp -r "$BASEDIR/node_modules/@fortawesome/fontawesome-free/css/all.min.css" "$STATIC_BUILD/css/font-awesome.css"
hugo gen chromastyles --style=monokai > "$STATIC_BUILD/css/highlight.css"
mkdir -p "$STATIC_BUILD/scss" mkdir -p "$STATIC_BUILD/scss"
cp -r "$STATIC_SRC/scss"/* "$STATIC_BUILD/scss" cp -r "$STATIC_SRC/scss"/* "$STATIC_BUILD/scss"
cp -r "$BASEDIR/node_modules/@fortawesome/fontawesome-free/webfonts" "$STATIC_BUILD"
hugo gen chromastyles --style=monokai > "$STATIC_BUILD/css/highlight.css"
hugo -vDEF --gc $@ hugo -vDEF --gc $@

View file

@ -1,8 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
BASEDIR="$PWD" BASEDIR="$PWD"
OUTPUT_DIR="$BASEDIR/public" export OUTPUT_DIR="$BASEDIR/public"
STATIC_SRC="$BASEDIR/static/src" export STATIC_SRC="$BASEDIR/static/src"
STATIC_BUILD="$BASEDIR/static/build" export STATIC_BUILD="$BASEDIR/static/build"
[[ -f "$BASEDIR/.env" ]] && export $(cat "$BASEDIR/.env" | xargs) if [[ -f "$BASEDIR/.env" ]]; then
export $(cat "$BASEDIR/.env" | xargs)
fi
NODE_BIN="$BASEDIR/node_modules/.bin"
export PATH="$NODE_BIN:$PATH"