mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[scripts] Add some of the legacy scripts
This commit is contained in:
parent
aeeda91fe7
commit
bb53d01244
4 changed files with 94 additions and 0 deletions
11
scripts/starall
Executable file
11
scripts/starall
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
ORG="$1"
|
||||
USRNAME="$2"
|
||||
TOKEN="$3"
|
||||
|
||||
for url in $(curl -Lf "https://api.github.com/orgs/$ORG/repos?per_page=1000" | jq -r '.[].html_url' | sort -u); do
|
||||
read repo <<< $(awk -F, -v url="$url" '{split($url,a,"/"); print a[5]}' <<<$url)
|
||||
echo "$ORG/$repo"
|
||||
curl -X PUT -H "Accept: application/vnd.github.v3+json" -u $USRNAME:$TOKEN "https://api.github.com/user/starred/$ORG/$repo"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue