mirror of the now-defunct rocklinux.org
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.

66 lines
1.9 KiB

  1. #!/bin/bash
  2. #
  3. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  4. #
  5. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  6. # Please add additional copyright information _after_ the line containing
  7. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  8. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  9. #
  10. # ROCK Linux: rock-src/scripts/Create-Links
  11. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version. A copy of the GNU General Public
  17. # License can be found at Documentation/COPYING.
  18. #
  19. # Many people helped and are helping developing ROCK Linux. Please
  20. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  21. # file for details.
  22. #
  23. # --- ROCK-COPYRIGHT-NOTE-END ---
  24. linkconfig=""
  25. linkbuild=""
  26. while [ "$1" ] ; do
  27. case "$1" in
  28. -config)
  29. linkconfig=config ; shift ;;
  30. -build)
  31. linkbuild=build ; shift ;;
  32. -*)
  33. echo
  34. echo "Usage: ./scripts/Create-Links [ -config ] [ -build ] target-dir"
  35. echo
  36. echo " Create symlinks from your ROCK Linux base directory to another directory."
  37. echo " This can be useful if you have the ROCK sources on one harddisk (NFS Share,"
  38. echo " etc) and want to build somewhere else."
  39. echo " Type './scripts/Help Create-Links' for details."
  40. echo
  41. exit 1 ;;
  42. *)
  43. break ;;
  44. esac
  45. done
  46. if [ -z "$1" -o "$#" != 1 -o ! -d "$1" ] ; then
  47. exec $0 --help
  48. fi
  49. for x in README COPYING ; do
  50. [ -e $1/$x ] || ln -vs Documentation/$x $1/$x
  51. done
  52. for x in architecture target misc scripts Documentation \
  53. download package $linkconfig $linkbuild
  54. do
  55. [ -e $x ] || mkdir $x
  56. [ -e $1/$x ] || ln -vs `pwd`/$x $1/$x
  57. done
  58. if [ ! -e $1/backup -a -e `pwd`/backup ] ; then
  59. ln -vs `pwd`/backup $1/backup
  60. fi