Skip to content

Instantly share code, notes, and snippets.

@qrkourier
Created August 2, 2024 19:18
Show Gist options
  • Save qrkourier/0dbb0f130a8ea03d57cf4314b229ccf9 to your computer and use it in GitHub Desktop.
Save qrkourier/0dbb0f130a8ea03d57cf4314b229ccf9 to your computer and use it in GitHub Desktop.
wrapper function for zrok --profile
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