Skip to content

Instantly share code, notes, and snippets.

@takehiko
Created September 12, 2013 20:18
Show Gist options
  • Save takehiko/6543175 to your computer and use it in GitHub Desktop.
Save takehiko/6543175 to your computer and use it in GitHub Desktop.
Settings for the environmental variable ARCHI, whose value is one of "linux", "cygwin", and "dummy"
# settings for ARCHI
if [ -f $ZDOTDIR/.archi.linux ]; then export ARCHI="linux"
elif [ -f $ZDOTDIR/.archi.cygwin ]; then export ARCHI="cygwin"
elif [ -f $ZDOTDIR/.archi.dummy ]; then export ARCHI="dummy"
elif which uname > /dev/null; then
case "`uname -sr`" in
Linux*); export ARCHI="linux" ; touch $ZDOTDIR/.archi.$ARCHI ;;
CYGWIN*); export ARCHI="cygwin" ; touch $ZDOTDIR/.archi.$ARCHI ;;
*); export ARCHI="dummy" ; touch $ZDOTDIR/.archi.$ARCHI ;;
esac
else
export ARCHI="dummy"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment