Last active
October 11, 2023 13:44
-
-
Save kopiro/c5cce6d43833875e565fe8daa085aad6 to your computer and use it in GitHub Desktop.
Automatic Flipper Zero upgrade from UberGuidoZ repository
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
#!/bin/bash | |
FLIPPER_APPS_DIR="/tmp/UberGuidoZFlipper" | |
FLIPPER_SD_DIR="/Volumes/Flipper SD" | |
if [ ! -d "$FLIPPER_SD_DIR" ]; then | |
echo "Flipper SD card not found at $FLIPPER_SD_DIR" | |
exit 1 | |
fi | |
if [ ! -d "$FLIPPER_APPS_DIR" ]; then | |
echo "UberGuidoZ repo not found - cloning now" | |
git clone --recurse-submodules --remote-submodules [email protected]:UberGuidoZ/Flipper.git "$FLIPPER_APPS_DIR" | |
fi | |
pushd "$FLIPPER_APPS_DIR" || exit | |
echo "Updating repo..." | |
git fetch origin && git reset --hard origin/main && git submodule update --init --recursive | |
echo "Syncing to SD card..." | |
RSYNC_OPTS="-r --exclude='.git' --exclude='.gitattributes' --exclude='.gitignore' --exclude='.github'" | |
echo "Syncing apps..." | |
rsync $RSYNC_OPTS "./Applications/Custom (UL, RM, XFW)/Unleashed (Extras)/" "$FLIPPER_SD_DIR/apps/Extras" | |
echo "Syncing subghz..." | |
rsync $RSYNC_OPTS "./Sub-GHz/" "$FLIPPER_SD_DIR/subghz" | |
echo "Syncing infrared..." | |
cp ./Infrared/*.ir "$FLIPPER_SD_DIR/infrared/assets/" | |
for dir in "badusb" "infrared" "nfc" "subplaylist" "unirf"; do | |
echo "Syncing $dir..." | |
rsync $RSYNC_OPTS "./$dir/" "$FLIPPER_SD_DIR/$dir" | |
done | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment