Created
August 27, 2019 11:20
-
-
Save sr229/3f0496dfdfeee7cbc1c93b496d880877 to your computer and use it in GitHub Desktop.
Silverblue delegate script for VSCode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright 2019 (c) Ayane Satomi | |
# Public Domain | |
# | |
# Delegate Script for VSCode | |
# This makes sure VScode only runs in a Toolbox container. | |
# This only works with a default container. | |
FEDORA_DEFAULT_CONTAINER="fedora-toolbox-$(whoami)-30" | |
if [ -z "$@" ]; then | |
# regular toolbox enter | |
toolbox enter -c "$FEDORA_DEFAULT_CONTAINER" | |
else | |
# if there is a command, execute it non-interactively. | |
toolbox run -c "$FEDORA_DEFAULT_CONTAINER" "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment