Created
August 2, 2024 19:18
-
-
Save qrkourier/0dbb0f130a8ea03d57cf4314b229ccf9 to your computer and use it in GitHub Desktop.
wrapper function for zrok --profile
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
zrok(){ | |
if [[ "$1" =~ ^(-p|--profile)$ ]] | |
then | |
shift | |
local profile="$1" | |
shift | |
else | |
/usr/bin/zrok ${@} | |
return $? | |
fi | |
local profile_dir="${HOME}/.zrok/profiles/${profile}" | |
if ! [[ -d "${profile_dir}" ]] | |
then | |
mkdir -p "${profile_dir}" | |
fi | |
HOME="${profile_dir}" /usr/bin/zrok ${@} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment