2023-02-25 02:44:30 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# distrobox_binary
|
|
|
|
# name: default
|
|
|
|
if [ ! -f /run/.containerenv ] && [ ! -f /.dockerenv ]; then
|
2023-04-09 10:29:18 +02:00
|
|
|
command="/bin/distrobox-enter -n default -- /bin/btop --utf-force "
|
2023-02-25 02:44:30 +01:00
|
|
|
|
|
|
|
for arg in "$@"; do
|
|
|
|
if echo "${arg}" | grep -Eq "'|\""; then
|
|
|
|
command="${command} \
|
|
|
|
$(echo "${arg}" | sed 's|\\|\\\\|g' |
|
|
|
|
sed 's| |\\ |g' |
|
|
|
|
sed 's|\$|\\\$|g' |
|
|
|
|
sed "s|'|\\\'|g" |
|
|
|
|
sed 's|"|\\\"|g')"
|
|
|
|
elif echo "${arg}" | grep -q "'"; then
|
|
|
|
command="${command} \"${arg}\""
|
|
|
|
else
|
|
|
|
command="${command} '${arg}'"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
eval ${command}
|
|
|
|
else
|
|
|
|
/bin/btop "$@"
|
|
|
|
fi
|