Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install script curl'ed from github:

Tags:

bash

curl

I have the following script hosted on Github: https://rawgit.com/oresoftware/quicklock/master/install.sh

the contents of that file are:

#!/usr/bin/env bash

set -e;
cd "$HOME"
mkdir -p "$HOME/.quicklock/locks"
curl https://rawgit.com/oresoftware/quicklock/master/install.sh > "$HOME/.quicklock/ql.sh"

echo "To complete installation of 'quicklock' add the following line to your .bash_profile file:";
echo ". \"$HOME/.quicklock/ql.sh\"";

I download and run this script with:

curl -o- https://rawgit.com/oresoftware/quicklock/master/install.sh | bash

but I get this error:

bash: line 1: Moved: command not found

That error is killing me, I cannot figure out what is causing it. I tried curl with both the -o- option and without.

like image 949
Alexander Mills Avatar asked Oct 18 '25 15:10

Alexander Mills


1 Answers

The url for raw git has changed, the error itsel is from curl.

Change rawgit.com to raw.githubusercontent.com.

Another option is to add -L to have curl follow the redirect link.

I figured this out by changing bash to bash -x. Here is the output:

curl -o- https://rawgit.com/oresoftware/quicklock/master/install.sh | bash -x
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   107  100   107    0     0    400      0 --:--:-- --:--:-- --:--:--   402
+(:1): Moved Permanently. Redirecting to https://raw.githubusercontent.com/oresoftware/quicklock/master/install.sh
bash: line 1: Moved: command not found
like image 131
xxfelixxx Avatar answered Oct 21 '25 04:10

xxfelixxx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!