-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
- Loading branch information
1 parent
b02675a
commit eb4e225
Showing
4 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env fish | ||
# SPDX-License-Identifier: MIT | ||
# Copyright (C) 2024 Nathan Chancellor | ||
|
||
function in_dbx -d "Test if currently in a distrobox" | ||
# https://github.com/89luca89/distrobox/blob/3bac964bf0952674848dce170af8b41d743abe57/docs/useful_tips.md?plain=1#L40 | ||
set -q CONTAINER_ID | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env fish | ||
# SPDX-License-Identifier: MIT | ||
# Copyright (C) 2024 Nathan Chancellor | ||
|
||
function in_nspawn -d "Test if currently within a systemd-nspawn container" | ||
test (systemd-detect-virt 2>/dev/null) = systemd-nspawn | ||
end |