Browse Source

Install Umbrel from a custom repo (#88)

swap
Aaron Dewes 5 years ago
committed by GitHub
parent
commit
625163b910
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      build.sh
  2. 17
      stage2/03-install-umbrel/01-run.sh

2
build.sh

@ -203,6 +203,8 @@ export QUILT_NO_DIFF_TIMESTAMPS=1
export QUILT_REFRESH_ARGS="-p ab"
export UMBREL_VERSION
export UMBREL_REPO
export UMBREL_BRANCH
# shellcheck source=scripts/common
source "${SCRIPT_DIR}/common"

17
stage2/03-install-umbrel/01-run.sh

@ -22,11 +22,23 @@ EOF
# Install Umbrel
echo "Installing Umbrel..."
echo
if [ -z ${UMBREL_REPO} ]; then
on_chroot << EOF
mkdir /home/${FIRST_USER_NAME}/umbrel
cd /home/${FIRST_USER_NAME}/umbrel
curl -L https://github.com/getumbrel/umbrel/archive/v${UMBREL_VERSION}.tar.gz | tar -xz --strip-components=1
chown -R ${FIRST_USER_NAME}:${FIRST_USER_NAME} /home/${FIRST_USER_NAME}
EOF
else
on_chroot << EOF
mkdir /home/${FIRST_USER_NAME}/umbrel
cd /home/${FIRST_USER_NAME}/umbrel
git clone ${UMBREL_REPO} -b "${UMBREL_BRANCH}" .
chown -R ${FIRST_USER_NAME}:${FIRST_USER_NAME} /home/${FIRST_USER_NAME}
EOF
fi
on_chroot << EOF
sed -i -e "s/\/home\/umbrel/\/home\/${FIRST_USER_NAME}/g" scripts/umbrel-os/umbrel-details
sed -i -e "s/\/home\/umbrel/\/home\/${FIRST_USER_NAME}/g" scripts/umbrel-os/services/umbrel-connection-details.service
EOF
@ -34,7 +46,12 @@ EOF
# Bundle Umbrel's Docker images
echo "Pulling Umbrel's Docker images..."
echo
if [ -z ${UMBREL_REPO} ]; then
wget -q "https://raw.githubusercontent.com/getumbrel/umbrel/v${UMBREL_VERSION}/docker-compose.yml"
else
export UMBREL_REPO_NAME=$(echo ${UMBREL_REPO} | sed "s/https:\/\/github.com\///g" | sed "s/.git//" | sed 's/"//g')
wget -q "https://raw.githubusercontent.com/${UMBREL_REPO_NAME}/${UMBREL_BRANCH}/docker-compose.yml"
fi
IMAGES=$(grep '^\s*image' docker-compose.yml | sed 's/image://' | sed 's/\"//g' | sed '/^$/d;s/[[:blank:]]//g' | sort | uniq)
echo
echo "Images to bundle: $IMAGES"

Loading…
Cancel
Save