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.

63 lines
1.5 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: lib/init/install_desktop.in
  6. # Copyright (C) 2008 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. # Register a window-manager
  17. #
  18. register_wm() {
  19. local regdir=usr/share/rock-registry
  20. [ -e $root/$regdir/wm ] || mkdir -p $root/$regdir/wm
  21. cat <<-EOT > "$root/$regdir/wm/$1"
  22. name="$2"
  23. exec="$3"
  24. EOT
  25. }
  26. # Register an application
  27. #
  28. register_application() {
  29. local regdir=usr/share/rock-registry
  30. [ -e $root/$regdir/app ] || mkdir -p $root/$regdir/app
  31. cat <<-EOT > "$root/$regdir/app/$1"
  32. name="$2"
  33. exec="$3"
  34. EOT
  35. }
  36. # Register a xdm - display manager
  37. #
  38. register_xdm() {
  39. local regdir=usr/share/rock-registry
  40. [ -e $root/$regdir/xdm ] || mkdir -p $root/$regdir/xdm
  41. cat <<-EOT > "$root/$regdir/xdm/$1"
  42. name="$2"
  43. exec="$3"
  44. EOT
  45. }
  46. install_desktop() {
  47. local file="$1" regdir=usr/share/rock-registry
  48. [ -e $root/$regdir/app ] || mkdir -p $root/$regdir/app
  49. echo "Installing ${file##*/} ..."
  50. rock_substitute $file > $root/$regdir/${file##*/}
  51. }
  52. for y in $( ls -1 $confdir/*.desktop 2> /dev/null ); do
  53. hook_add postinstall 6 "install_desktop '$y'"
  54. done