Miscs
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Applications opened from a file manager do not inherit variables exported by
|
||||
# an interactive shell (for example GEMINI_API_KEY from ~/.zshrc). Re-enter
|
||||
# through the user's shell once so its startup file can provide those values.
|
||||
if [[ -z "${GEMINI_API_KEY:-}" && -z "${COPIENATOR_GUI_SHELL_LOADED:-}" && -x "${SHELL:-}" ]]; then
|
||||
export COPIENATOR_GUI_SHELL_LOADED=1
|
||||
exec "$SHELL" -ic 'exec "$@"' copienator-gui-shell "$0" "$@"
|
||||
fi
|
||||
|
||||
# With no arguments, choose the newest visible immediate subfolder by mtime.
|
||||
if [[ $# -eq 0 ]]; then
|
||||
newest=""
|
||||
|
||||
Reference in New Issue
Block a user