fcm_setup_konqueror 1018 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/sh
  2. # ------------------------------------------------------------------------------
  3. # NAME
  4. # fcm_setup_konqueror
  5. #
  6. # SYNOPSIS
  7. # fcm_setup_konqueror
  8. #
  9. # DESCRIPTION
  10. # Set up Konqueror to use "fcm gui".
  11. #
  12. # COPYRIGHT
  13. # (C) Crown copyright Met Office. All rights reserved.
  14. # For further details please refer to the file COPYRIGHT.txt
  15. # which you should have received as part of this distribution.
  16. # ------------------------------------------------------------------------------
  17. # Check number of arguments
  18. script=`basename $0`
  19. usage="$script: no argument required"
  20. if (( $# != 0 )); then
  21. echo "$usage, abort..." >&2
  22. exit 1
  23. fi
  24. filename=fcm_gui.desktop
  25. file=`dirname $0`
  26. if [[ `basename $file` = bin ]]; then
  27. file=`dirname $file`
  28. fi
  29. file=$file/etc/$filename
  30. if [[ ! -f $file ]]; then
  31. echo "$script: $file not found, abort..." >&2
  32. exit 1
  33. fi
  34. dir=$HOME/.kde/share/applnk/.hidden
  35. mkdir -p $dir
  36. cd $dir
  37. rm -f $filename # Always remove.
  38. ln -s $file .
  39. echo "$script: finished"
  40. #EOF