3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 SDKTMPDIR
=`dirname $0`
24 OO_SDK_HOME
=`(cd $SDKTMPDIR && pwd && cd $CURRENTDIR) | head -n 1`
25 OOVERSION
=`cat $OO_SDK_HOME/settings/dk.mk | tail -3 | head -n 1 | cut -d"=" -f2 | cut -d"." -f1,2`
26 if [ "$OSTYPE" = "Darwin" ]
28 OO_SDK_NAME
=`basename $OO_SDK_HOME`
30 OO_SDK_NAME
=libreoffice
${OOVERSION}_sdk
35 if [ "$1" = "--force-configure" ]
37 if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh
]
39 rm $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh
42 elif [ "$1" = "-h" ] ||
[ "$1" = "--help" ] ||
[ -n "$1" ]
45 echo " using: setsdkenv_unix [options]"
48 echo " --force-configure : force a new configuration of your SDK environment."
49 echo " Alternatively can you edit your SDK environment scripts directly:"
50 echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.sh"
51 echo " -h, --help : print this help and exit"
56 # source the prepared environment and start a new shell
57 if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh
]
59 .
$HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh
62 echo " ************************************************************************"
64 echo " * You have to configure your SDK environment first before you can"
65 echo " * use it. The configuration has to be done only once."
67 echo " ************************************************************************"
70 perl
$OO_SDK_HOME/configure.pl
$HOSTNAME $OO_SDK_HOME $OO_SDK_NAME
72 .
$HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh
76 echo Shell terminated.
79 echo "\e]2;$TERMHEAD\a"