shadowm

wesnoth-default-config-only

Jan 30th, 2012
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/sh
  2. # Run Wesnoth on a clean, throwaway config directory.
  3.  
  4. WESNOTH_BIN_PATH=$1
  5. TEMP_CONFIG_DIR=`mktemp -qd --tmpdir wesnoth-default.XXXXXXXXXX`
  6.  
  7. if test x$TEMP_CONFIG_DIR = x; then
  8.     echo "Could not create temporary dir before launch!"
  9.     exit 20
  10. fi
  11.  
  12. shift
  13.  
  14. $WESNOTH_BIN_PATH --config-dir $TEMP_CONFIG_DIR $@
  15.  
  16. rm -rf $TEMP_CONFIG_DIR || echo "Could not remove temporary config dir after launch!"
Advertisement
Add Comment
Please, Sign In to add comment