#!/bin/sh
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
#
|
|
# Filename: lib/init/install_desktop.in
|
|
# Copyright (C) 2008 The OpenSDE Project
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
|
#
|
|
# More information can be found in the files COPYING and README.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
# GNU General Public License can be found in the file COPYING.
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
# Register a window-manager
|
|
#
|
|
register_wm() {
|
|
local regdir=usr/share/rock-registry
|
|
[ -e $root/$regdir/wm ] || mkdir -p $root/$regdir/wm
|
|
|
|
cat <<-EOT > "$root/$regdir/wm/$1"
|
|
name="$2"
|
|
exec="$3"
|
|
EOT
|
|
}
|
|
|
|
# Register an application
|
|
#
|
|
register_application() {
|
|
local regdir=usr/share/rock-registry
|
|
[ -e $root/$regdir/app ] || mkdir -p $root/$regdir/app
|
|
|
|
cat <<-EOT > "$root/$regdir/app/$1"
|
|
name="$2"
|
|
exec="$3"
|
|
EOT
|
|
}
|
|
|
|
# Register a xdm - display manager
|
|
#
|
|
register_xdm() {
|
|
local regdir=usr/share/rock-registry
|
|
[ -e $root/$regdir/xdm ] || mkdir -p $root/$regdir/xdm
|
|
|
|
cat <<-EOT > "$root/$regdir/xdm/$1"
|
|
name="$2"
|
|
exec="$3"
|
|
EOT
|
|
}
|
|
|
|
install_desktop() {
|
|
local file="$1" regdir=usr/share/rock-registry
|
|
[ -e $root/$regdir/app ] || mkdir -p $root/$regdir/app
|
|
|
|
echo "Installing ${file##*/} ..."
|
|
rock_substitute $file > $root/$regdir/${file##*/}
|
|
}
|
|
|
|
for y in $( ls -1 $confdir/*.desktop 2> /dev/null ); do
|
|
hook_add postinstall 6 "install_desktop '$y'"
|
|
done
|