Update dotfiles/.local/bin/update-local-betelgeuse, dotfiles/.local/bin/provision, dotfiles/.local/Taskfile-localhost.yml
This commit is contained in:
parent
c0fb2d4207
commit
d16d725a2c
3 changed files with 69 additions and 2 deletions
|
@ -2,18 +2,61 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
provision:
|
||||||
|
desc: Provision the environment
|
||||||
|
summary: |
|
||||||
|
# Provision the Environment
|
||||||
|
|
||||||
|
This task will provision the current environment using a variety of tools.
|
||||||
|
It will prompt you for details like what type of environment you are provisioning.
|
||||||
|
Optionally, you can skip the prompt by passing a CLI argument like so:
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
`run localhost:provision -- terminal`
|
||||||
|
|
||||||
|
The above example will run the `localhost:provision:terminal` task.
|
||||||
|
cmds:
|
||||||
|
- |
|
||||||
|
if [ "{{.CLI_ARGS}}" != "" ]; then
|
||||||
|
run localhost:provision:{{.CLI_ARGS}}
|
||||||
|
else
|
||||||
|
run localhost:provision:prompt
|
||||||
|
fi
|
||||||
|
|
||||||
|
provision:prompt:
|
||||||
|
deps:
|
||||||
|
- :install:software:gum
|
||||||
|
cmds:
|
||||||
|
- logg prompt 'Select the type of environment you would like to provision'
|
||||||
|
- logg prompt '`Terminal` - Installs standard CLI tools that augment the terminal experience'
|
||||||
|
- logg prompt '`Development` - Provisions Terminal and also installs useful tools for development'
|
||||||
|
- logg prompt '`Full` - Provisions with both Terminal and Development and then it installs all the Brewfile-supported software from the Gas Station project (e.g. https://gitlab.com/megabyte-labs/gas-station).'
|
||||||
|
- |
|
||||||
|
CHOICE="$(logg choose "Terminal" "Development" "Full")"
|
||||||
|
if [ "$CHOICE" = 'Development' ]; then
|
||||||
|
run localhost:provision:dev
|
||||||
|
elif [ "$CHOICE" = 'Terminal' ]; then
|
||||||
|
run localhost:provision:terminal
|
||||||
|
elif [ "$CHOICE" = 'Full' ]; then
|
||||||
|
run localhost:provision:full
|
||||||
|
fi
|
||||||
|
|
||||||
provision:dev:
|
provision:dev:
|
||||||
deps:
|
deps:
|
||||||
|
- :install:software:bundle
|
||||||
- provision:terminal
|
- provision:terminal
|
||||||
cmds:
|
cmds:
|
||||||
- brew bundle --file "$HOME/.local/Brewfile.dev"
|
- brew bundle --file "$HOME/.local/Brewfile.dev"
|
||||||
|
|
||||||
provision:full:
|
provision:full:
|
||||||
deps:
|
deps:
|
||||||
|
- :install:software:bundle
|
||||||
- provision:dev
|
- provision:dev
|
||||||
cmds:
|
cmds:
|
||||||
- brew bundle --file "$HOME/.local/Brewfile.full"
|
- brew bundle --file "$HOME/.local/Brewfile.full"
|
||||||
|
|
||||||
provision:terminal:
|
provision:terminal:
|
||||||
|
deps:
|
||||||
|
- :install:software:bundle
|
||||||
cmds:
|
cmds:
|
||||||
- brew bundle --file "$HOME/.local/Brewfile.terminal"
|
- brew bundle --file "$HOME/.local/Brewfile.terminal"
|
||||||
|
|
|
@ -10,8 +10,13 @@ if ! type brew &> /dev/null; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Homebrew bundle and go-task
|
# Install Homebrew bundle and go-task
|
||||||
brew tap Homebrew/bundle
|
|
||||||
brew install go-task/tap/go-task
|
brew install go-task/tap/go-task
|
||||||
|
|
||||||
# Use run alias to invoke the `$HOME/.local/Taskfile.yml`
|
# Use run alias to invoke the `$HOME/.local/Taskfile.yml`
|
||||||
run localhost:provision:terminal
|
chmod +x $HOME/.local/bin/*
|
||||||
|
install-dotfiles &
|
||||||
|
install-terminal-theme &
|
||||||
|
update-local-betelgeuse &
|
||||||
|
update-taskfiles &
|
||||||
|
wait
|
||||||
|
run localhost:provision
|
||||||
|
|
19
dotfiles/.local/bin/update-local-betelgeuse
Normal file
19
dotfiles/.local/bin/update-local-betelgeuse
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -f '/etc/qubes-release' ]; then
|
||||||
|
# Qubes dom0
|
||||||
|
qvm-create --label red --template debian-11 provision &> /dev/null || EXIT_CODE=$?
|
||||||
|
qvm-run --pass-io provision 'rm -f ~/Downloads/betelgeuse-master.tar.gz && curl -sSL https://gitlab.com/megabyte-labs/misc/betelgeuse/-/archive/master/betelgeuse-master.tar.gz > /tmp/betelgeuse-master.tar.gz'
|
||||||
|
qvm-run --pass-io provision "cat /tmp/betelgeuse-master.tar.gz" > "/tmp/betelgeuse-master.tar.gz"
|
||||||
|
cd /tmp
|
||||||
|
tar -xvf betelgeuse-master.tar.gz > /dev/null
|
||||||
|
rm betelgeuse-master.tar.gz
|
||||||
|
cp -rf betelgeuse-master/share/ "$HOME/.local/share"
|
||||||
|
rm -rf betelgeuse-master
|
||||||
|
else
|
||||||
|
curl -sSL https://gitlab.com/megabyte-labs/misc/betelgeuse/-/archive/master/betelgeuse-master.tar.gz > betelgeuse-master.tar.gz
|
||||||
|
tar -xzf betelgeuse-master.tar.gz > /dev/null
|
||||||
|
rm betelgeuse-master.tar.gz
|
||||||
|
cp -rf betelgeuse-master/share/ "$HOME/.local/share"
|
||||||
|
rm -rf betelgeuse-master
|
||||||
|
fi
|
Loading…
Reference in a new issue