Last active
February 22, 2023 17:21
-
-
Save rafael-g-depaulo/6abffe0c83403cbca7f85984223c9230 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT_FILENAME="setup-env.sh" | |
function get_script_url() { | |
curl -s https://api.github.com/users/$1/gists | # list all gists | |
grep "\"filename\": \"$2\"" -A 5 -B 1 | # get the file object | |
grep "raw_url" | # get raw_url line | |
sed 's/.*"raw_url": "\(.*\)",.*/\1/' # extract url | |
} | |
sudo -u $USER bash -c "$(curl -s $(get_script_url "rafael-g-depaulo" "setup-env.sh"))" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment