generated from ublue-os/boxkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13f10d8
commit fbcf9bb
Showing
1 changed file
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Initialize variables with default values | ||
binpath=/home/linuxbrew/.linuxbrew/bin | ||
|
||
# Parse flags | ||
while getopts ":vi:o:" opt; do | ||
case ${opt} in | ||
s ) | ||
brewpath=/home/linuxbrew/.linuxbrew/sbin | ||
;; | ||
R ) | ||
root=true | ||
;; | ||
\? ) | ||
echo "Invalid option: $OPTARG" 1>&2 | ||
exit 1 | ||
;; | ||
: ) | ||
echo "Option -$OPTARG requires an argument" 1>&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
shift $((OPTIND -1)) | ||
|
||
bin=$1 | ||
|
||
if [ "$root" = "true" ]; then | ||
distrobox-export --bin $brewpath/$bin --export-path $HOME/.local/share/clinuxbrew/exports/bin | ||
else | ||
distrobox-export --bin $brewpath/$bin --export-path $HOME/.local/share/clinuxbrew/exports/bin | ||
fi |