Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issues (?) in installer script #10

Open
kemege opened this issue Feb 18, 2023 · 4 comments
Open

Compatibility issues (?) in installer script #10

kemege opened this issue Feb 18, 2023 · 4 comments

Comments

@kemege
Copy link

kemege commented Feb 18, 2023

When I run

curl -sL https://raw.githubusercontent.com/pluveto/flydav/main/scripts/installer.sh | sudo bash

in Debian 11.6, I got the following error:

bash: line 129: ARCH: command not found

It turns out that bash identifies the ARCH in $(ARCH) in Line 129 as a command, and changing it to $ARCH seems to resolve the problem.

I'm not quite familiar with bash, but as this script has existed for a long time, perhaps this bug is specific to some new version of bash?

@pluveto
Copy link
Owner

pluveto commented Feb 18, 2023

Try the new version

@kemege
Copy link
Author

kemege commented Feb 18, 2023

Thank you for your quick response!
The previous problem has been resolved. However, I found another problem when using the command in README.
When I use curl to download the script, and use "sudo bash" to run it, everything is fine.
However, if I use pipe to run the script, like curl -sL ... | sudo bash, all the places that require user input are skipped automatically, and the script will exit with error. The output will be like this:

$ curl -sL https://raw.githubusercontent.com/pluveto/flydav/main/scripts/installer.sh | sudo bash
Getting latest release from https://api.github.com/repos/pluveto/flydavDownloading flydav v0.2.46 from https://github.com/pluveto/flydav/releases/download/v0.2.46/flydav-app-linux-amd64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:-  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:-  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  3 4518k    3  159k    0     0   135k      0  0:00:33  0:00:01  0:00:3100 4518k  100 4518k    0     0  2458k      0  0:00:01  0:00:01 --:--:-- 6594k
Downloaded flydav to /tmp/flydav_install/flydav.zip
Archive:  /tmp/flydav_install/flydav.zip
   creating: /tmp/flydav_install/dist/linux_amd64/
  inflating: /tmp/flydav_install/dist/linux_amd64/flydav
Configuration file /etc/flydav/flydav.toml already exists.
Do you want to keep it? (y/n)
Installing binary
Creating user flydav
Creating directory
mkdir: cannot create directory ‘’: No such file or directory
Failed to run mkdir -p

@pluveto
Copy link
Owner

pluveto commented Feb 18, 2023 via email

@pluveto
Copy link
Owner

pluveto commented Feb 19, 2023

I think we can download the installer and execute it manually.

curl -sL "https://raw.githubusercontent.com/pluveto/flydav/main/scripts/installer.sh" -o /tmp/flydav-installer.sh
sudo chmod +x /tmp/flydav-installer.sh
sudo bash
sudo rm -f /tmp/flydav-installer.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants