Skip to content

Instantly share code, notes, and snippets.

@uplus
Last active January 6, 2022 13:54
Show Gist options
  • Save uplus/eb527115399656d39a7e0e5eb4d624f5 to your computer and use it in GitHub Desktop.
Save uplus/eb527115399656d39a7e0e5eb4d624f5 to your computer and use it in GitHub Desktop.
setup_my_tmp() {
TMPDIR=/private/my_tmp
sudo mkdir -p "${TMPDIR}"
sudo mount_tmpfs "${TMPDIR}"
sudo chmod 1777 "${TMPDIR}"
export TMPDIR
}
if [[ $(stat -c '%a' '/private/my_tmp') = 1777 ]]; then
export TMPDIR='/private/my_tmp'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment