Skip to content

Commit

Permalink
conditionally run a bluefin-dx user setup script based on IMAGE_INFO
Browse files Browse the repository at this point in the history
  • Loading branch information
jeefy committed Dec 22, 2023
1 parent 2d528fa commit fae9ce8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
12 changes: 12 additions & 0 deletions dx/usr/bin/bluefin-dx-user-setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# Including this check here as well as a failsafe
if [[ -f $USER_SETUP_VER_FILE && $USER_SETUP_VER = $USER_SETUP_VER_RAN ]]; then
echo "User setup has already run. Exiting..."
exit 0
fi

# Setup VSCode
# Pre-install preferred VSCode Extensions
code --install-extension ms-vscode-remote.remote-containers
cp -r /usr/share/ublue-os/configs/vscode/settings.json $HOME/.config/Code/User/settings.json
9 changes: 5 additions & 4 deletions usr/bin/ublue-user-setup
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
# Enable NTP
timedatectl set-ntp true

# Setup VSCode
# Pre-install preferred VSCode Extensions
code --install-extension ms-vscode-remote.remote-containers
cp -r /usr/share/ublue-os/configs/vscode/settings.json $HOME/.config/Code/User/settings.json
if [[ $IMAGE_NAME = "bluefin-dx" ]]; then

source /usr/bin/bluefin-dx-user-setup

fi


# Prevent future executions
Expand Down

0 comments on commit fae9ce8

Please sign in to comment.