Author: cfinck
Date: Sat Dec 22 18:02:15 2007
New Revision: 31395
URL:
http://svn.reactos.org/svn/reactos?rev=31395&view=rev
Log:
- Add a "scut.sh" script for executing scut and changing the current directory
appropriately
- Add a "basedir.sh" script for the "basedir" command.
Previously, bash only read the $_ROSSOURCEDIR variable one time, when the prompt was
started, and then never again.
- Add both scripts as aliases to the "RosBE-rc" file.
- Clarify with a better prompt, why I recommend to run the installation script as the
"root" user.
- Update the Readme file.
Added:
trunk/tools/RosBE/RosBE-Unix/scripts/basedir.sh (with props)
trunk/tools/RosBE/RosBE-Unix/scripts/scut.sh (with props)
Modified:
trunk/tools/RosBE/RosBE-Unix/README.odt
trunk/tools/RosBE/RosBE-Unix/RosBE-Builder.sh
trunk/tools/RosBE/RosBE-Unix/scripts/RosBE-rc
Modified: trunk/tools/RosBE/RosBE-Unix/README.odt
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/README.odt?…
==============================================================================
Binary files - no diff available.
Modified: trunk/tools/RosBE/RosBE-Unix/RosBE-Builder.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/RosBE-Build…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/RosBE-Builder.sh (original)
+++ trunk/tools/RosBE/RosBE-Unix/RosBE-Builder.sh Sat Dec 22 18:02:15 2007
@@ -102,7 +102,9 @@
if [ ! "`whoami`" = "root" ]; then
boldmsg "User is not \"root\""
- echo "It is recommended to run this script as the \"root\" user.
Otherwise you probably cannot create the necessary directories."
+ echo "The default installation path for the Build Environment is
\"$DEFAULT_INSTALL_DIR\"."
+ echo "Therefore it is recommended to run this script as the \"root\"
user. Otherwise you probably cannot create the necessary directories."
+ echo "An alternative is to specify another installation directory at the
installation process."
echo "Do you really want to continue? (yes/no)"
read -p "[no] " answer
Modified: trunk/tools/RosBE/RosBE-Unix/scripts/RosBE-rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/scripts/Ros…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/scripts/RosBE-rc (original)
+++ trunk/tools/RosBE/RosBE-Unix/scripts/RosBE-rc Sat Dec 22 18:02:15 2007
@@ -2,11 +2,12 @@
PATH="$_ROSSCRIPTDIR/bin:$PATH"
# Set aliases
-alias basedir="cd $_ROSSOURCEDIR"
+alias basedir="source $_ROSSCRIPTDIR/basedir.sh"
alias clean="$_ROSSCRIPTDIR/clean.sh"
alias help="$_ROSSCRIPTDIR/help.sh"
alias make="$_ROSSCRIPTDIR/build.sh"
alias makex="$_ROSSCRIPTDIR/build-multi.sh"
+alias scut="source $_ROSSCRIPTDIR/scut.sh"
alias version="$_ROSSCRIPTDIR/version.sh"
# Display the available commands
Added: trunk/tools/RosBE/RosBE-Unix/scripts/basedir.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/scripts/bas…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/scripts/basedir.sh (added)
+++ trunk/tools/RosBE/RosBE-Unix/scripts/basedir.sh Sat Dec 22 18:02:15 2007
@@ -1,0 +1,10 @@
+#!/bin/bash
+#
+# Script for changing the current directory to $_ROSSOURCEDIR
+# Part of RosBE for Unix-based Operating Systems
+# Copyright 2007 Colin Finck <mail(a)colinfinck.de>
+#
+# Released under GNU GPL v2 or any later version.
+
+# An alias just to "cd $_ROSSOURCEDIR" won't work as bash only expands when
executing the shell and then never again
+cd "$_ROSSOURCEDIR"
Propchange: trunk/tools/RosBE/RosBE-Unix/scripts/basedir.sh
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/tools/RosBE/RosBE-Unix/scripts/scut.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/scripts/scu…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/scripts/scut.sh (added)
+++ trunk/tools/RosBE/RosBE-Unix/scripts/scut.sh Sat Dec 22 18:02:15 2007
@@ -1,0 +1,25 @@
+#!/bin/bash
+#
+# Script for launching scut and changing the current directory appropriately
+# Part of RosBE for Unix-based Operating Systems
+# Copyright 2007 Colin Finck <mail(a)colinfinck.de>
+#
+# Released under GNU GPL v2 or any later version.
+
+case "$1" in
+add|rem|edit|def|list|/?|-h|--help)
+ # It's an scut parameter, which can just be passed to the program
+ "$_ROSSCRIPTDIR/bin/scut" $*
+ ;;
+
+*)
+ # It's probably the name of a shortcut
+ _ROSSOURCEDIR=`"$_ROSSCRIPTDIR/bin/scut" $*`
+
+ if [ "$_ROSSOURCEDIR" != "Default" ] && [ -d
"$_ROSSOURCEDIR" ]; then
+ export _ROSSOURCEDIR
+ basedir
+ fi
+
+ ;;
+esac
Propchange: trunk/tools/RosBE/RosBE-Unix/scripts/scut.sh
------------------------------------------------------------------------------
svn:eol-style = native