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.

62 lines
1.5 KiB

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