I'm stuck passing a parameter(URL to download) to a script.
My goal is to create a script for deployment that downloads and installs an app. The script I run:
curl url_GitHub | bash -s url_download_app
The script on GitHub:
#! /bin/sh
url="$2"
filename=$(basename "$url")
workpath=$(dirname $(readlink -f $0))
curl $url -o $workpath/$filename -s
sudo dpkg --install $workpath/$filename
As I understood it doesn't pass the URL to download the app to the URL="$2" variable.
If I run the GitHub script locally, and pass the URL to download the app, it executes successfully. Smth like:
bash install.sh -s url_download_app
Please help=)