Add support for sudo-install on systems with sudo compiled w/ --with-secure-path

This commit is contained in:
Paul Baumgart authored and Ross Boucher committed 2010-02-19 13:01:11 -08:00
1 parent 25dfcd38a7
commit 99b43fed7f
3 files changed
+19 -12

No files matched your search

+5 -1
View File
@@ -57,7 +57,11 @@ task ("sudo-install", ["CommonJS"], function()
// FIXME: require("narwhal/tusk/install").install({}, $COMMONJS);
// Doesn't work due to some weird this.print business.
if (OS.system(["sudo", "tusk", "install", "--force", $BUILD_CJS_OBJECTIVE_J, $BUILD_CJS_CAPPUCCINO]))
OS.exit(1); //rake abort if ($? != 0)
{
// Attempt a hackish work-around for sudo compiled with the --with-secure-path option
if (OS.system("sudo bash -c 'source `sh shell_config_file.sh`; tusk install --force " + $BUILD_CJS_OBJECTIVE_J + " " + $BUILD_CJS_CAPPUCCINO + "'"))
OS.exit(1); //rake abort if ($? != 0)
}
});
// Documentation
+1 -11
View File
@@ -35,17 +35,7 @@ function ask_remove_dir () {
function ask_append_shell_config () {
config_string="$1"
shell_config_file=""
# use order outlined by http://hayne.net/MacDev/Notes/unixFAQ.html#shellStartup
if [ -f "$HOME/.bash_profile" ]; then
shell_config_file="$HOME/.bash_profile"
elif [ -f "$HOME/.bash_login" ]; then
shell_config_file="$HOME/.bash_login"
elif [ -f "$HOME/.profile" ]; then
shell_config_file="$HOME/.profile"
elif [ -f "$HOME/.bashrc" ]; then
shell_config_file="$HOME/.bashrc"
fi
shell_config_file=`sh shell_config_file.sh`
echo " \"$config_string\" will be appended to \"$shell_config_file\"."
if prompt; then
+13
View File
@@ -0,0 +1,13 @@
shell_config_file=""
# use order outlined by http://hayne.net/MacDev/Notes/unixFAQ.html#shellStartup
if [ -f "$HOME/.bash_profile" ]; then
shell_config_file="$HOME/.bash_profile"
elif [ -f "$HOME/.bash_login" ]; then
shell_config_file="$HOME/.bash_login"
elif [ -f "$HOME/.profile" ]; then
shell_config_file="$HOME/.profile"
elif [ -f "$HOME/.bashrc" ]; then
shell_config_file="$HOME/.bashrc"
fi
echo $shell_config_file