OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.3 KiB

  1. #!/bin/bash
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: scripts/Create-Links
  6. # Copyright (C) 2006 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  8. # Copyright (C) 1998 - 2003 Clifford Wolf
  9. #
  10. # More information can be found in the files COPYING and README.
  11. #
  12. # This program is free software; you can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; version 2 of the License. A copy of the
  15. # GNU General Public License can be found in the file COPYING.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. sderootdirs="scripts bin etc lib misc doc src package architecture target"
  18. linkconfig=""
  19. linkbuild=""
  20. while [ "$1" ] ; do
  21. case "$1" in
  22. -config)
  23. linkconfig=config ; shift ;;
  24. -build)
  25. linkbuild=build ; shift ;;
  26. -*)
  27. echo
  28. echo "Usage: ./scripts/Create-Links [ -config ] [ -build ] target-dir"
  29. echo
  30. exit 1 ;;
  31. *)
  32. break ;;
  33. esac
  34. done
  35. if [ -z "$1" -o "$#" != 1 -o ! -d "$1" ] ; then
  36. exec $0 --help
  37. fi
  38. for x in $sderootdirs download $linkconfig $linkbuild; do
  39. [ -e $x ] || mkdir $x
  40. [ -e $1/$x ] || ln -vs `pwd`/$x $1/$x
  41. done
  42. if [ ! -e $1/backup -a -e `pwd`/backup ] ; then
  43. ln -vs `pwd`/backup $1/backup
  44. fi