fire219 / sadie

Simple Android Download and Install Executable
MIT License
5 stars 3 forks source link

syntax error for Ubuntu 16.04.4 from sh install #4

Open ghost opened 6 years ago

ghost commented 6 years ago

When I run the sh executable script you provided, sh throws an error and stops. There is also an earlier error that seems to get ignored by sh, but still ends up repeating unnessecary re-installs. Your script doesn't seem to install dependencies at all, actually, or the installs might be failing on my system, but I'm pretty sure of the earlier possibility. It says it is installing the same tools every time I run this script. Terminal output text (just after all messages that don't affect your script):

sadie.sh: 31: read: Illegal option -s

====Preparation==== Script will now check to make sure all required tools are available.

Stage 1: Detect host distribution apt package manager detected. Stage 2: Check for essential utilities

dialog not found. Now installing; please wait a moment. sadie.sh: 64: sadie.sh: Reading: not found make not found. Now installing; please wait a moment. sadie.sh: 64: sadie.sh: Reading: not found gcc not found. Now installing; please wait a moment. sadie.sh: 64: sadie.sh: Reading: not found wget not found. Now installing; please wait a moment. sadie.sh: 64: sadie.sh: Reading: not found unzip not found. Now installing; please wait a moment. sadie.sh: 64: sadie.sh: Reading: not found jq not found. Now installing; please wait a moment. sadie.sh: 64: sadie.sh: Reading: not found

Stage 3: Check for rkflashtool rkflashtool not found. Must be compiled and installed. Please wait... sadie.sh: 73: sadie.sh: git: not found make: rkflashtool: No such file or directory. Stop. make: rkflashtool: No such file or directory. Stop. sadie.sh: 80: sadie.sh: Syntax error: "(" unexpected

fire219 commented 6 years ago

That is a lot of errors... grasping at straws here... are you using sh as the terminal instead of bash? SADIE is supposed to force itself to load in bash, but it looks like it's trying to use behaviors that are present in bash and most other sh-like shells, but not "normal" sh itself.

ghost commented 6 years ago

I used ubuntu GNOME terminal provided by the Desktop distro, which does indeed seem to be bash. I executed it by changing my directory to "/home/owner/Downloads" (which is where I decided to keep it.) and then I issued the bash command with sudo

sudo sh sadie.sh

If I try using "sudo ./sadie.sh", sudo throws an error.

sudo: ./sadie.sh: command not found

I can also confirm that the modules "wget", "make", "gcc", "unzip", and "jq" are already installed, but your script doesn't seem to notice. maybe it's looking under the wrong directory for this in my distro?

However, since you seem to be saying that ./ might be the only way to load it... I will try logging in a root before executing it... I will get back to you in a few minutes.

EDIT: Okay, so after trying to execute as superuser (and finally remembering to mark it as executable) under "/home/sadie.sh" I used the bash command without sudo:

./sadie.sh

and it ran fine this time.

To close this: I'd recommend changing your guidance of this program to include text after every failure that says "are you sure this file was marked as executable?" or something like that. It can help troubleshoot issues like these much faster in the future.