You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I like to see a script before I download it from the internet and run it as root, I downloaded it manually with just
$ wget -q https://repo.i2pd.xyz/.help/add_repo
reviewed it, made it executable with chmod +x add_repo and then did sudo ./add_repo
But that exits with the error:
./add_repo: 3: [[: not found
./add_repo: 9: source: not found
./add_repo: 11: function: not found
./add_repo: 30: [[: not found
./add_repo: 30: : Permission denied
./add_repo: 62: [[: not found
./add_repo: 66: Syntax error: "}" unexpected
That's because the add_repo script has the #!/bin/sh shebang, and that symlinks to /bin/dash on Debian Bullseye and Dash does not understand the if clause with double brackets like if [[ $EUID -ne 0 ]]; then.
Since Bash is mandatory and documented, I would suggest to set the shebang in add_repo to #/bin/bash accordingly.
Workaround would be to run sudo bash ./add_repo but that's unnecessary complicated and I do not see a reason why not to define the proper Shebang in the script itself.
I did not find a github repo for https://repo.i2pd.xyz/.help/add_repo, if I had, I would have created a pull request already.
The text was updated successfully, but these errors were encountered:
OS: Debian Bullseye
According to
https://i2pd.readthedocs.io/en/latest/user-guide/install/ -> Debian section
and
https://repo.i2pd.xyz/.help/readme.html
one should download and run the script "add_repo" with the Bash interpreter, using the following command:
$ wget -q -O - https://repo.i2pd.xyz/.help/add_repo | sudo bash -s -
(note the "bash" command here)
Since I like to see a script before I download it from the internet and run it as root, I downloaded it manually with just
$ wget -q https://repo.i2pd.xyz/.help/add_repo
reviewed it, made it executable with
chmod +x add_repo
and then didsudo ./add_repo
But that exits with the error:
That's because the
add_repo
script has the#!/bin/sh
shebang, and that symlinks to /bin/dash on Debian Bullseye and Dash does not understand the if clause with double brackets likeif [[ $EUID -ne 0 ]]; then
.Since Bash is mandatory and documented, I would suggest to set the shebang in
add_repo
to#/bin/bash
accordingly.Workaround would be to run
sudo bash ./add_repo
but that's unnecessary complicated and I do not see a reason why not to define the proper Shebang in the script itself.I did not find a github repo for
https://repo.i2pd.xyz/.help/add_repo
, if I had, I would have created a pull request already.The text was updated successfully, but these errors were encountered: