Talk:1654: Universal Install Script
A few comments:
- curl | sh is still a common way to install things like package managers. Until you have Homebrew, or pip (for older versions of Python that didn't bootstrap it), etc., you can't use a package manager to install it, so they usually give you a one-liner to download and run a shell script that installs the package manager. Of course this isn't an issue for linux distros (which, unlike OS X, come with a built-in package manager).
- Mac users probably only interact with Steam through its GUI, but on linux, running steamcmd is more common. And this command will install a game that's in your library but not downloaded yet.
- I don't know why _only_ apt gets a sudo, but for brew, and for typical installations of Python on a Mac, you don't want or need sudo; they encourage you to leave the relevant directory writable by your normal user account.
- This script only handles the popular package managers on OS X and current popular linux distros. No port for FreeBSD, no Choco for Windows, etc. In fact, if you try it on Windows, you should get an error message telling you that you've ruined the joke by trying to extend it.
--126.96.36.199 10:44, 11 March 2016 (UTC)
Also, docker is a deployment tool for deploying isolated, complete applications. For example, instead of just installing the Python scripts to run your web server behind nginx, you'd deploy nginx, Python, the modules you need for each, the appropriate configurations, a variety of tools the server depends on, and your scripts all as one big hunk of stuff. The docker website probably explains it better. :) --188.8.131.52 10:50, 11 March 2016 (UTC)
He forgot the .git on the end of the git clone command.
--184.108.40.206 11:16, 11 March 2016 (UTC)
- Actually, the command works fine anyway. I don't know whether it's git or GitHub which works around this. 220.127.116.11 11:46, 11 March 2016 (UTC)
- Really? I've been typing 4 more characters than I needed to all this time. 18.104.22.168 16:29, 11 March 2016 (UTC)
Also, the TLD in the curl. And, the install script would probably be at /install.sh, and use sh not bash.
Sh is generally preferred in scripting anyway since it comes on all *nix systems by default. Bash is on a very large number of systems, but not all.
Apt-get should have the -y flag.
If installing a program, npm should be given the -g flag to install globally instead of just in this directory.
Most programs print errors (as would arise if a package did not exist) to the console even if they are run with an & to indicate it should not be attached to the session. In this case, it should be &>/dev/null.
The program as a whole ignores previous programs and continues anyway. If it was found in one package manager, it would be a a very bad idea to write over it with another package manager's copy. This is part of the point of the comic, as is noted in the title text, but it's still an error. --22.214.171.124 11:38, 11 March 2016 (UTC)
He forgot cpanm. :) 126.96.36.199 16:02, 11 March 2016 (UTC)
He also left off emerge for Gentoo users. 188.8.131.52 19:08, 11 March 2016 (UTC)
That whooshing sound you heard was the Linux-y stuff going way over my head, but could part of the joke be that he's trying to install money? With all the $1's in the script? 184.108.40.206 15:47, 11 March 2016 (UTC)
- No, all those $ are just part of the scripting language -- the $1's get replaced with the name of the program you're trying to install. There are so many $ simply because he's included so many install commands, each one of which needs the name of the program.-boB (talk) 16:00, 11 March 2016 (UTC)
- On that note, would any of these fail or would it not just be easier to use `[email protected]`? xerxesbeat (talk) 19:27, 11 March 2016 (UTC)
- Inaccurate Description of &&
The description formerly described the usage of &&:
"This bug could be indicative that Randall wanted to use && throughout the whole script. This would make the installation trying sequentially and the first successful install stops the script and will not install multiple versions of the same software."
This is false. The && operator will *quit* when it encounters the first command that *fails*. The operator that behaves as described is ||. With that said, it is obvious that Randall did not intend this, especially because the title text mentions what happens when multiple versions are installed.
220.127.116.11 16:23, 11 March 2016 (UTC)
- i am very disappointed that that does not read "doesn't work..." --18.104.22.168 12:58, 14 March 2016 (UTC)
- Added clarification on bash scripts
I've added a few lines addressing the concerns formerly displayed in the incomplete tag. Hopefully my edits will be easier for the layman to understand. Please let me know if this needs further attention. AfroThundr3007730 (talk) 12:30, 16 March 2016 (UTC)
He totally forgot to include "urpmi $1" --22.214.171.124 03:33, 17 March 2016 (UTC)
- Meta Package Manager