Skip to content

Commit

Permalink
copyedit strings
Browse files Browse the repository at this point in the history
  • Loading branch information
debergalis authored and n1mmy committed Mar 7, 2012
1 parent 740098f commit 101d112
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
27 changes: 14 additions & 13 deletions admin/install-s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ elif [ "$UNAME" = "Linux" ] ; then
### Linux ###
ARCH=`uname -m`
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then
echo "Unsupported architecture: $ARCH"
echo "Meteor only supports i686 and x86_64 for now."
echo "Unable to install Meteor on unsupported architecture: $ARCH"
exit 1
fi

Expand All @@ -100,7 +99,7 @@ elif [ "$UNAME" = "Linux" ] ; then
elif [ -x "/usr/bin/wget" ] ; then
/usr/bin/wget -q $1
else
echo "Can't find wget or curl."
echo "Unable to install Meteor: can't find wget or curl in /usr/bin."
exit 1
fi
}
Expand All @@ -110,11 +109,14 @@ elif [ "$UNAME" = "Linux" ] ; then
if [ `whoami` = 'root' ] ; then
$*
elif [ -x /bin/sudo -o -x /usr/bin/sudo ] ; then
echo "Root access required. Trying sudo. This may prompt for a password."
echo "Since this system includes sudo, Meteor will request root privileges to"
echo "install. You may be prompted for a password. If you prefer to not use"
echo "sudo, please re-run this script as root."
echo "sudo $*"
sudo $*
else
echo "Root access required. Please re-run this script as root."
echo "Meteor requires root privileges to install. Please re-run this script as"
echo "root."
exit 1
fi
}
Expand All @@ -125,7 +127,7 @@ elif [ "$UNAME" = "Linux" ] ; then

if [ -f "/etc/debian_version" ] ; then
## Debian
echo "... detected Debian. downloading .deb"
echo "Detected a Debian system. Downloading install package."
if [ "$ARCH" = "i686" ] ; then
DEBARCH="i386"
elif [ "$ARCH" = "x86_64" ] ; then
Expand All @@ -136,16 +138,15 @@ elif [ "$UNAME" = "Linux" ] ; then
URL="$URLBASE/$FILE"
download_url $URL
if [ ! -f "$FILE" ] ; then
echo "Download failed."
echo "Error: package download failed (no .deb file in $TMPDIR)."
exit 1
fi
echo "... installing .deb"
echo "Installing $TMPDIR/$FILE"
do_with_root dpkg -i "$FILE"


elif [ -f /etc/redhat_version -o -x /bin/rpm ] ; then
## Redhat
echo "... detected RedHat. downloading .rpm"
echo "Detected a RedHat system. Downloading install package."
if [ "$ARCH" = "i686" ] ; then
RPMARCH="i386"
else
Expand All @@ -156,14 +157,14 @@ elif [ "$UNAME" = "Linux" ] ; then
URL="$URLBASE/$FILE"
download_url $URL
if [ ! -f "$FILE" ] ; then
echo "Download failed."
echo "Error: package download failed (no .rpm file in $TMPDIR)."
exit 1
fi
echo "... installing .rpm"
echo "Installing $TMPDIR/$FILE"
do_with_root rpm -U --force "$FILE"

else
echo "Unsupported Linux distribution."
echo "Unable to install. Meteor supports RedHat and Debian."
exit 1
fi

Expand Down
11 changes: 7 additions & 4 deletions app/meteor/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ updater.get_manifest(function (manifest) {
} else if (path.existsSync("/bin/sudo") ||
path.existsSync("/usr/bin/sudo")) {
// spawn a sudo
console.log("Root access required for update. Trying sudo. This may prompt for a password.");
console.log("Since this system includes sudo, Meteor will request root privileges to");
console.log("install. You may be prompted for a password. If you prefer to not use");
console.log("sudo, please re-run this command as root.");
console.log("sudo", cmd, args.join(" "));
return spawn('sudo', [cmd].concat(args));
}

// no root, no sudo. fail
console.log("Root access required for update. Please re-run this command as root.");
console.log("Meteor requires root privileges to install. Please re-run this command");
console.log("as root.");
process.exit(1);
return null; // unreached, but makes js2 mode happy.
};
Expand Down Expand Up @@ -140,7 +143,7 @@ updater.get_manifest(function (manifest) {
var proc = run_with_root('rpm', ['-U', '--force', rpm_path]);
proc.on('exit', function (code, signal) {
if (code !== 0 || signal) {
console.log("failed to install rpm");
console.log("Error: failed to install Meteor RPM package.");
return;
}
// success!
Expand Down Expand Up @@ -170,7 +173,7 @@ updater.get_manifest(function (manifest) {

tar_proc.on('exit', function (code, signal) {
if (code !== 0 || signal) {
console.log("failed to untar download");
console.log("Error: package download failed.");
return;
}

Expand Down

0 comments on commit 101d112

Please sign in to comment.