Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2012
1,177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ "$1" != '' ]; then
  4.     if [ -e ~/.wine-$1 ]; then
  5.         if [ `cat ~/.wineprefix | cut -d \/ -f 4 | cut -d - -f 2` != $1 ]; then
  6.             echo "WINEPREFIX set to ~/.wine-$1"
  7.             echo export WINEPREFIX=~/.wine-$1 > ~/.wineprefix
  8.             exec bash
  9.         else
  10.             echo "WINEPREFIX is already pointing to the correct directory."
  11.         fi
  12.     else
  13.         echo "Not a valid WINEPREFIX."
  14.     fi
  15. else
  16.     echo "File - ~/.wine-`cat ~/.wineprefix | cut -d \/ -f 4 | cut -d - -f 2`"
  17.     echo "Env - ~/.wine-`echo $WINEPREFIX | cut -d - -f 2`"
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement