20 lines
492 B
Bash
20 lines
492 B
Bash
|
|
#!/bin/sh
|
||
|
|
set -eu
|
||
|
|
|
||
|
|
THEME_DIR="themes/LoveIt"
|
||
|
|
THEME_REPO="https://github.com/dillonzq/LoveIt.git"
|
||
|
|
THEME_REF="${LOVEIT_REF:-master}"
|
||
|
|
|
||
|
|
mkdir -p themes
|
||
|
|
|
||
|
|
if [ -d "${THEME_DIR}/.git" ]; then
|
||
|
|
echo "Updating LoveIt theme..."
|
||
|
|
git -C "${THEME_DIR}" fetch --depth 1 origin "${THEME_REF}"
|
||
|
|
git -C "${THEME_DIR}" checkout -f FETCH_HEAD
|
||
|
|
else
|
||
|
|
echo "Cloning LoveIt theme..."
|
||
|
|
git clone --depth 1 --branch "${THEME_REF}" "${THEME_REPO}" "${THEME_DIR}"
|
||
|
|
fi
|
||
|
|
|
||
|
|
echo "LoveIt theme is ready in ${THEME_DIR}"
|