Files
MagicSetEditor2/tools/linux-installer/install
T
coppro f2d6714da9 (sorry for making this all one commit)
Fiddled with the backbone for scripts some more.
VCS are now suppported in sets but configuration/non-svn-systems missing
Linux build now uses precompiled headers (build time--)
A couple warning fixes too.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1427 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-09-16 23:40:44 +00:00

57 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# Magic Set Editor 2 beta.
# This script and this program are licensed under the GNU General Public License Version 2
# The full text of this license is in the file COPYING
# This script installs Magic Set Editor onto your system.
# If executed as root (including via sudo), it is installed to /usr/local/share/magicseteditor. (with an executable symlink in /usr/local/bin)
# If executed as any other user, it will install to ~/.magicseteditor with a symlink in ~/bin.
case $UID in
0)
INSTALL_DIR='/usr/local/share/magicseteditor/';
EXEC_SYMLINK='/usr/local/bin/magicseteditor';
FONTS_DIR='/usr/local/share/fonts/';
CHMOD='chmod +x';;
*)
INSTALL_DIR='$HOME/.magicseteditor/';
EXEC_SYMLINK='$HOME/bin/magicseteditor';
FONTS_DIR='$HOME/.fonts/';
CHMOD='chmod u+x';;
esac
if [ "$MSE_INSTALL_DIR" != "" ]; then
INSTALL_DIR=$MSE_INSTALL_DIR
fi
if [ "$MSE_EXEC_SYMLINK" != "" ]; then
EXEC_SYMLINK=$MSE_EXEC_SYMLINK
fi
if [ "$MSE_FONTS_DIR" != "" ]; then
FONTS_DIR=$MSE_FONTS_DIR
fi
echo "Magic Set Editor version $VERSION Installer Script.
Magic Set Editor will be installed to $INSTALL_DIR.
Fonts will be installed to $FONTS_DIR.
A symbolic link to the executable will be put at $EXEC_SYMLINK.
Is this correct [y/N]? ";
read -n 1 CONFIRM;
case $CONFIRM in
[yY])
:;;
*)
exit;;
esac;
echo "Installing...";
mkdir "$INSTALL_DIR";
cp -r program/* "$INSTALL_DIR";
$CHMOD "$INSTALL_DIR/magicseteditor";
cp fonts/* "$FONTS_DIR";
ln -s "$INSTALL_DIR/magicseteditor" "$EXEC_SYMLINK"