mirror of
https://github.com/kingomarnajjar/desktop-environment.git
synced 2026-07-29 05:00:35 +10:00
path-fix
This commit is contained in:
parent
cc6e33ba63
commit
fff379c028
20 changed files with 64 additions and 64 deletions
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
# Start a desktop environment detached from this shell
|
||||
nohup gosu $DESKTOP_ENVIRONMENT_USER alacritty </dev/null >/dev/null 2>&1 &
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ if [ $USER != "root" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
# Fork setup to desktop environment global location immediately
|
||||
if [ ! "$REPO_ROOT" -ef "$DESKTOP_ENVIRONMENT_REPOSITORY" ]; then
|
||||
|
|
@ -133,10 +133,10 @@ gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-til
|
|||
gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-zsh.git
|
||||
|
||||
# Ensure the desktop environment container exists before starting
|
||||
$REPO_ROOT/scripts/build.sh
|
||||
$REPO_ROOT/docker/scripts/build.sh
|
||||
|
||||
# Ensure the container user has ownership of the volumes before starting
|
||||
$REPO_ROOT/scripts/bootstrap-volumes.sh
|
||||
$REPO_ROOT/docker/scripts/bootstrap-volumes.sh
|
||||
|
||||
# Recycle the desktop environment
|
||||
$DESKTOP_ENVIRONMENT_REPOSITORY/scripts/recycle.sh
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
docker build \
|
||||
--build-arg DESKTOP_CONTAINER_BUILD_DATE=$(date +%s) \
|
||||
--build-arg DESKTOP_CONTAINER_GIT_SHA=$(git --git-dir $REPO_ROOT/.git rev-parse HEAD | cut -b 1-7) \
|
||||
--build-arg DESKTOP_CONTAINER_GIT_SHA=$(git --git-dir $REPO_ROOT/docker/.git rev-parse HEAD | cut -b 1-7) \
|
||||
--tag $DESKTOP_ENVIRONMENT_REGISTRY/$DESKTOP_ENVIRONMENT_CONTAINER:$DESKTOP_ENVIRONMENT_BRANCH \
|
||||
$REPO_ROOT
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Clean secrets and home
|
||||
$REPO_ROOT/scripts/clean-secrets.sh
|
||||
$REPO_ROOT/docker/scripts/clean-secrets.sh
|
||||
|
||||
# Remove volumes that can be recreated from scratch, but require manual configuration in app
|
||||
docker volume rm DESKTOP_ENVIRONMENT_STATE_CHROME
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Perform standard clean
|
||||
$REPO_ROOT/scripts/clean.sh
|
||||
$REPO_ROOT/docker/scripts/clean.sh
|
||||
|
||||
# Remove volumes containing secrets
|
||||
docker volume rm DESKTOP_ENVIRONMENT_CACHE_SECRETS
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Stop the running environment so there are no containers using the volumes, ignoring errors if it does not exist
|
||||
$REPO_ROOT/scripts/stop.sh 2>/dev/null
|
||||
$REPO_ROOT/docker/scripts/stop.sh 2>/dev/null
|
||||
|
||||
# Remove volumes that can be recreated from scratch, directly from the container filesystem
|
||||
docker volume rm DESKTOP_ENVIRONMENT_CACHE_VCSH
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Desktop environment container user
|
||||
DESKTOP_ENVIRONMENT_USER=jackson
|
||||
|
|
@ -7,7 +7,7 @@ DESKTOP_ENVIRONMENT_HOME=/$DESKTOP_ENVIRONMENT_USER/home
|
|||
DESKTOP_ENVIRONMENT_REGISTRY=sabrehagen
|
||||
|
||||
# Desktop environment repository configuration
|
||||
echo DESKTOP_ENVIRONMENT_BRANCH=$(git --git-dir $REPO_ROOT/.git rev-parse --abbrev-ref HEAD)
|
||||
echo DESKTOP_ENVIRONMENT_BRANCH=$(git --git-dir $REPO_ROOT/docker/.git rev-parse --abbrev-ref HEAD)
|
||||
echo DESKTOP_ENVIRONMENT_CONTAINER=$DESKTOP_ENVIRONMENT_CONTAINER
|
||||
echo DESKTOP_ENVIRONMENT_HOME=$DESKTOP_ENVIRONMENT_HOME
|
||||
echo DESKTOP_ENVIRONMENT_USER=$DESKTOP_ENVIRONMENT_USER
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
docker exec \
|
||||
--interactive \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
docker exec \
|
||||
--interactive \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
# Remove all non desktop environment containers
|
||||
docker ps -a | \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Check for changes to vcsh repositories before removing home volume
|
||||
$REPO_ROOT/scripts/exec.sh "vcsh status | grep -qE \"^ M \" -"
|
||||
$REPO_ROOT/docker/scripts/exec.sh "vcsh status | grep -qE \"^ M \" -"
|
||||
DOTFILES_CHANGED=$?
|
||||
|
||||
if [ "$DOTFILES_CHANGED" = "0" ]; then
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
docker push $DESKTOP_ENVIRONMENT_REGISTRY/$DESKTOP_ENVIRONMENT_CONTAINER:$DESKTOP_ENVIRONMENT_BRANCH
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Rebuild the desktop environment
|
||||
$REPO_ROOT/scripts/build.sh
|
||||
$REPO_ROOT/docker/scripts/build.sh
|
||||
|
||||
# Check for data loss before recycling
|
||||
$REPO_ROOT/scripts/pre-clean.sh
|
||||
$REPO_ROOT/docker/scripts/pre-clean.sh
|
||||
|
||||
# Reset the desktop environment state
|
||||
$REPO_ROOT/scripts/clean-hard.sh
|
||||
$REPO_ROOT/scripts/start.sh
|
||||
$REPO_ROOT/scripts/alacritty.sh
|
||||
$REPO_ROOT/docker/scripts/clean-hard.sh
|
||||
$REPO_ROOT/docker/scripts/start.sh
|
||||
$REPO_ROOT/docker/scripts/alacritty.sh
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Rebuild the desktop environment container
|
||||
$REPO_ROOT/scripts/build.sh
|
||||
$REPO_ROOT/docker/scripts/build.sh
|
||||
|
||||
# Check for data loss before recycling
|
||||
$REPO_ROOT/scripts/pre-clean.sh
|
||||
$REPO_ROOT/docker/scripts/pre-clean.sh
|
||||
|
||||
# Reset the desktop environment state
|
||||
$REPO_ROOT/scripts/clean-secrets.sh
|
||||
$REPO_ROOT/scripts/start.sh
|
||||
$REPO_ROOT/scripts/alacritty.sh
|
||||
$REPO_ROOT/docker/scripts/clean-secrets.sh
|
||||
$REPO_ROOT/docker/scripts/start.sh
|
||||
$REPO_ROOT/docker/scripts/alacritty.sh
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Rebuild the desktop environment
|
||||
$REPO_ROOT/scripts/build.sh
|
||||
$REPO_ROOT/docker/scripts/build.sh
|
||||
|
||||
# Check for data loss before recycling
|
||||
$REPO_ROOT/scripts/pre-clean.sh
|
||||
$REPO_ROOT/docker/scripts/pre-clean.sh
|
||||
|
||||
# Reset the desktop environment state
|
||||
$REPO_ROOT/scripts/clean.sh
|
||||
$REPO_ROOT/scripts/start.sh
|
||||
$REPO_ROOT/scripts/alacritty.sh
|
||||
$REPO_ROOT/docker/scripts/clean.sh
|
||||
$REPO_ROOT/docker/scripts/start.sh
|
||||
$REPO_ROOT/docker/scripts/alacritty.sh
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
$REPO_ROOT/scripts/stop.sh
|
||||
$REPO_ROOT/scripts/start.sh
|
||||
$REPO_ROOT/scripts/alacritty.sh
|
||||
$REPO_ROOT/docker/scripts/stop.sh
|
||||
$REPO_ROOT/docker/scripts/start.sh
|
||||
$REPO_ROOT/docker/scripts/alacritty.sh
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
docker exec \
|
||||
--interactive \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
docker run \
|
||||
--cap-add SYS_PTRACE \
|
||||
|
|
@ -20,7 +20,7 @@ docker run \
|
|||
--interactive \
|
||||
--name $DESKTOP_ENVIRONMENT_CONTAINER \
|
||||
--rm \
|
||||
--security-opt seccomp:$REPO_ROOT/config/chrome/chrome.json \
|
||||
--security-opt seccomp:$REPO_ROOT/docker/config/chrome/chrome.json \
|
||||
--tty \
|
||||
--volume /dev/shm:/dev/shm \
|
||||
--volume /etc/localtime:/etc/localtime:ro \
|
||||
|
|
@ -59,9 +59,9 @@ docker run \
|
|||
until docker inspect $DESKTOP_ENVIRONMENT_CONTAINER | grep Status | grep -m 1 running >/dev/null; do sleep 1; done
|
||||
|
||||
# Start desktop services
|
||||
# $REPO_ROOT/scripts/exec-root.sh s6-svc -u /run/s6/services/gotty
|
||||
# $REPO_ROOT/scripts/exec-root.sh s6-svc -u /run/s6/services/keychain
|
||||
# $REPO_ROOT/scripts/exec-root.sh s6-svc -u /run/s6/services/rescuetime
|
||||
# $REPO_ROOT/scripts/exec-root.sh s6-svc -u /run/s6/services/tmux-desktop-environment
|
||||
# $REPO_ROOT/scripts/exec-root.sh s6-svc -u /run/s6/services/tmux-gotty-clients
|
||||
# $REPO_ROOT/scripts/exec-root.sh s6-svc -u /run/s6/services/webrelay
|
||||
# $REPO_ROOT/docker/scripts/exec-root.sh s6-svc -u /run/s6/services/gotty
|
||||
# $REPO_ROOT/docker/scripts/exec-root.sh s6-svc -u /run/s6/services/keychain
|
||||
# $REPO_ROOT/docker/scripts/exec-root.sh s6-svc -u /run/s6/services/rescuetime
|
||||
# $REPO_ROOT/docker/scripts/exec-root.sh s6-svc -u /run/s6/services/tmux-desktop-environment
|
||||
# $REPO_ROOT/docker/scripts/exec-root.sh s6-svc -u /run/s6/services/tmux-gotty-clients
|
||||
# $REPO_ROOT/docker/scripts/exec-root.sh s6-svc -u /run/s6/services/webrelay
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
docker rm -f $DESKTOP_ENVIRONMENT_CONTAINER
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
REPO_ROOT=$(dirname $(realpath $0))/..
|
||||
REPO_ROOT=$(dirname $(realpath $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
export $($REPO_ROOT/scripts/environment.sh)
|
||||
export $($REPO_ROOT/docker/scripts/environment.sh)
|
||||
|
||||
DESKTOP_ENVIRONMENT_VOLUMES=$(cat scripts/environment.sh | grep -E "CACHE|STATE|USER_" | cut -b 6- | cut -f 1 -d =)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue