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

Improve installation instructions #1

Closed
saloniamatteo opened this issue Jun 11, 2020 · 4 comments
Closed

Improve installation instructions #1

saloniamatteo opened this issue Jun 11, 2020 · 4 comments

Comments

@saloniamatteo
Copy link

saloniamatteo commented Jun 11, 2020

Instead of running:

​mkdir bin
#Installing dependencies
pkg update -y && pkg install wget -y && pkg install python -y && pkg install ffmpeg -y
yes | pip install youtube-dl

#Installing the script
wget -P "./bin/" --no-check-certificate "https://raw.githubusercontent.com/M3GABOY/Termux_url_opener_all_in_one_downloader/master/termux-url-opener" 
chmod +x "./bin/termux-url-opener"
termux-setup-storage

Why not run:

​mkdir bin
# Install dependencies
pkg update -y && pkg install wget python ffmpeg -y
# Install youtube-dl with pip and don't ask user for confirmation
yes | pip install youtube-dl

# Download the script from this repository
wget -P "./bin/" --no-check-certificate "https://raw.githubusercontent.com/M3GABOY/Termux_url_opener_all_in_one_downloader/master/termux-url-opener" 
# Make the script executable
chmod +x "./bin/termux-url-opener"
# Setup external storage access on Termux
termux-setup-storage

Also, instead of running:
(This is an example but you get the idea)

if [ condition ]; then
    do-something
else if [ condition-two ]; then
    do-something-else
else
    error-command
fi

Use the code below:

[[ condition ]] && do-something || [[ condition-two ]] && do-something-else || error-command
@saloniamatteo saloniamatteo changed the title Shorten installation instructions Improve installation instructions Jun 11, 2020
@RossComputerGuy
Copy link

Also the shell script that is downloaded is a mess, a case statement would make things so much cleaner. And why in the current working directory's .bin folder? I think it should install to $HOME/.bin/.

@bboymega
Copy link
Owner

bboymega commented Nov 4, 2020

Also the shell script that is downloaded is a mess, a case statement would make things so much cleaner. And why in the current working directory's .bin folder? I think it should install to $HOME/.bin/.

This script should be run in the default location (home folder of ternux), the folder that termux is launched

@RossComputerGuy
Copy link

Yeah, the location that I proposed is a subdirectory in the home folder.

@bboymega
Copy link
Owner

bboymega commented Nov 4, 2020

Yeah, the location that I proposed is a subdirectory in the home folder.

Already fixed the installation location issue. Now the script can be run without changing the directory to the home folder

@bboymega bboymega closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants