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 | |
# 检查产品是否匹配 | |
fastboot getvar product 2>&1 | grep -E "^product: *gauguin" || { echo "Mismatch image and device"; exit 1; } | |
# 刷写镜像 | |
fastboot flash super "$(dirname "$0")/images/super.img" || { echo "Flash super error"; exit 1; } | |
fastboot flash cust "$(dirname "$0")/images/cust.img" || { echo "Flash cust error"; exit 1; } | |
# 擦除和刷写其他镜像 |
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 | |
declare -a remote_dirs=("sdcard/inshot/" | |
"sdcard/DCIM/" | |
"sdcard/Pictures/" | |
"sdcard/Download" | |
"sdcard/Movies/") | |
bak=bak_$(date +"%Y%m%d-%H%M%S") | |
for dir in "${remote_dirs[@]}" |
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
REMOTE=origin | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
BATCH_SIZE=10 | |
# check if the branch exists on the remote | |
# if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then | |
# # if so, only push the commits that are not on the remote already | |
# range=$REMOTE/$BRANCH..HEAD | |
# else | |
# # else push all the commits |