Created
January 28, 2025 20:07
-
-
Save Tknott95/0117df06a34c589e6df7ba11d8dd66e4 to your computer and use it in GitHub Desktop.
flipper zero archiver
This file contains hidden or 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
#!/bin/bash | |
# GitHub organization name | |
ORG="DarkFlippers" | |
# GitHub API URL to list public repos for the organization | |
API_URL="https://api.github.com/orgs/$ORG/repos" | |
# Directory to store cloned repositories | |
CLONE_DIR="$HOME/${ORG}_repos" | |
# Create the directory if it doesn't exist | |
mkdir -p "$CLONE_DIR" | |
echo "Fetching repositories for $ORG..." | |
REPO_LIST=$(curl -s "$API_URL" | jq -r '.[].clone_url') | |
if [ -z "$REPO_LIST" ]; then | |
echo "No repositories found or failed to fetch data. Check the organization name or network connection." | |
exit 1 | |
fi | |
echo "Cloning repositories into $CLONE_DIR..." | |
cd "$CLONE_DIR" || exit | |
for REPO_URL in $REPO_LIST; do | |
REPO_NAME=$(basename "$REPO_URL" .git) | |
if [ -d "$REPO_NAME" ]; then | |
echo "Repository $REPO_NAME already exists. Skipping..." | |
else | |
echo "Cloning $REPO_URL..." | |
git clone "$REPO_URL" | |
fi | |
done | |
echo "All repositories cloned into $CLONE_DIR." |
RogueMaster (RogueMaster ) FIRMWARE
#!/bin/bash
# GitHub organization name
ORG="RogueMaster "
# GitHub API URL to list public repos for the organization
API_URL="https://api.github.com/orgs/$ORG/repos"
# Directory to store cloned repositories
CLONE_DIR="$HOME/${ORG}_repos"
# Create the directory if it doesn't exist
mkdir -p "$CLONE_DIR"
echo "Fetching repositories for $ORG..."
REPO_LIST=$(curl -s "$API_URL" | jq -r '.[].clone_url')
if [ -z "$REPO_LIST" ]; then
echo "No repositories found or failed to fetch data. Check the organization name or network connection."
exit 1
fi
echo "Cloning repositories into $CLONE_DIR..."
cd "$CLONE_DIR" || exit
for REPO_URL in $REPO_LIST; do
REPO_NAME=$(basename "$REPO_URL" .git)
if [ -d "$REPO_NAME" ]; then
echo "Repository $REPO_NAME already exists. Skipping..."
else
echo "Cloning $REPO_URL..."
git clone "$REPO_URL"
fi
done
echo "All repositories cloned into $CLONE_DIR."
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NEXT FLIP (momentum) FIRMWARE