2 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 # Filename: bin/sde-install
6 # Copyright (C) 2006 - 2008 The OpenSDE Project
8 # More information can be found in the files COPYING and README.
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 # --- SDE-COPYRIGHT-NOTE-END ---
16 #Description: Install the `sde` wrapper on $HOME/bin/
21 export SDEROOT
=$
( cd "${0%/*}/.."; pwd -P )
23 .
$SDEROOT/lib
/libsde.
in
28 Installs a symlink of the sde wrapper at \$HOME/bin/,
29 which is supposed to be on \$PATH
33 # what action was requested?
36 elif [ -L "$HOME/bin/sde" ]; then
37 if [ "$( readlink -f $HOME/bin/sde )" = "$SDEROOT/bin/sde" ]; then
38 echo_warning
"the same sde wrapper is already installed, skip."
40 echo_warning
"sde wrapper already installed [$( readlink -f $HOME/bin/sde )]"
41 ln -sf "$SDEROOT/bin/sde" "$HOME/bin/sde"
42 echo_info
"sde wrapper reinstalled at $HOME/bin/"
44 elif [ -e "$HOME/bin/sde" ]; then
45 echo_abort
1 "Something is already at '$HOME/bin/sde', this is not supported."
48 ln -s "$SDEROOT/bin/sde" "$HOME/bin/sde"
49 echo_info
"sde wrapper installed at $HOME/bin/"