t2sde/misc/tail/install_desktop.in
René Rebe 5e58d22873 * s/rock-registry/registry/
git-svn-id: https://svn.exactcode.de/t2/trunk@66077 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
2023-12-18 17:49:04 +00:00

63 lines
1.5 KiB
Bash

#!/bin/sh
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: misc/tail/install_desktop.in
# Copyright (C) 2004 - 2005 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.
# --- T2-COPYRIGHT-NOTE-END ---
# Register a window-manager
#
register_wm() {
local regdir=usr/share/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/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/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/registry
[ -e $root/$regdir/app ] || mkdir -p $root/$regdir/app
echo "Installing ${file##*/} ..."
sde_substitute $file > $root/$regdir/${file##*/}
}
for y in $( ls -1 $confdir/*.desktop 2> /dev/null ); do
hook_add postinstall 6 "install_desktop '$y'"
done