ezinstall.hp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #!/bin/ksh
  2. echo ""
  3. echo "ezinstall.hp is a very plain, very vanilla, very simple installation"
  4. echo "script that installs the CDE Desktop and executes a set of config-"
  5. echo "uration scripts. It assumes that you have set aside ample space - "
  6. echo "about 46 Mb - for installation."
  7. echo ""
  8. echo "The Desktop is installed into the directory /usr/dt. This is the"
  9. echo "logical top of CDE. If you wish to change the physical location"
  10. echo "of the files, set up a symbolic link between /usr/dt and the actual"
  11. echo "location. E.g., if you wish to physically locate the CDE files in"
  12. echo "/bigdisk/opt, do a 'ln -s /bigdisk/opt /usr/dt' before executing the"
  13. echo "ezinstall.hp script."
  14. echo ""
  15. echo "Okay?"
  16. echo ""
  17. read response
  18. if [ `/usr/bin/whoami` != "root" ]
  19. then
  20. echo ""
  21. echo "You must be root to run this script"
  22. echo ""
  23. exit 1
  24. fi
  25. if [ "$1" = "" -o "$2" = "" ]
  26. then
  27. echo "Usage: ezinstall <the compressed tar of dt> <the tar of the scripts>"
  28. echo " [ -clean ]"
  29. exit 1
  30. fi
  31. ztar=$1
  32. star=$2
  33. #
  34. # have to install in /usr/dt
  35. #
  36. # clean it first
  37. #
  38. if [ "$3" = "-clean" ]
  39. then
  40. rm -rf /usr/dt/*
  41. rm -rf /var/dt/*
  42. fi
  43. if [ "$1" != "skip" ]
  44. then
  45. compress -d <$ztar | tar xvf -
  46. fi
  47. #
  48. # place the scripts in /tmp/ez
  49. #
  50. mkdir /tmp/ez
  51. echo "$PWD: copying $star to /tmp/ez"
  52. cp $star /tmp/ez
  53. cd /tmp/ez
  54. tarfile=${star##*/}
  55. tar xvf $tarfile
  56. #
  57. # execute each of the scripts
  58. #
  59. for i in config* hp/config*
  60. do
  61. if [ -f $i ]
  62. then
  63. if [ ! -x $i ]
  64. then
  65. chmod 555 $i
  66. fi
  67. echo "executing $i script"
  68. ./$i
  69. fi
  70. done
  71. cd /tmp
  72. rm -rf /tmp/ez
  73. echo ""
  74. echo "All done!"
  75. echo "type /usr/dt/bin/dtlogin to start CDE"
  76. echo ""