Guest User

Untitled

a guest
Feb 12th, 2018
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #/**
  4. # * @file run.sh
  5. # * @brief just start WebGrab+Plus
  6. # * @author Francis De Paemeleere
  7. # * @date 31/07/2016
  8. # */
  9.  
  10. #backup the current working dir
  11. WG_BCKP_DIR="$(pwd)"
  12.  
  13. function quit {
  14. #restore previous working dir
  15. cd "$WG_BCKP_DIR"
  16. exit $1;
  17. }
  18.  
  19. # check if mono can be found
  20. which mono >/dev/null 2>&1 || { echo >&2 "Mono required, but it's not installed."; quit 1; }
  21.  
  22. # get the absolute path of the link (or relative path)
  23. if [ -L $0 ] ; then
  24. DIR=$(dirname $(readlink -f $0)) ;
  25. else
  26. DUTDIR=$(dirname $0) ;
  27. if [ "${DUTDIR:0:1}" = "/" ]; then
  28. DIR="$DUTDIR";
  29. else
  30. DIR=$PWD/$(dirname $0) ;
  31. fi
  32. fi ;
  33.  
  34. mono "$DIR/bin/WebGrab+Plus.exe" "$DIR"
  35.  
  36. quit 0;
Add Comment
Please, Sign In to add comment