File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44git clone https://github.com/RevengeOS-Devices/official_devices official_devices
55
66cd official_devices
7- LIST=$( git diff-tree --no-commit-id --name-only -r HEAD)
8- echo $LIST > temp
9- sed ' s|/.*||' -i temp
7+ git diff-tree --no-commit-id --name-only -r HEAD | sed ' s|/.*||' > temp
108DEVICE=$( cat temp)
9+ for i in $( cat temp) ; do
10+ if [ " $i " == " maintainers.json" ]; then
11+ DEVICE=maintainers.json
12+ echo $DEVICE
13+ fi
14+ done
1115cd ..
1216rm -rf official_devices
1317echo $DEVICE
14- export DEVICE
Original file line number Diff line number Diff line change @@ -6,25 +6,17 @@ source $(pwd)/helpers/push_helpers.sh
66# Export TARGET_DEVICE from last updated device inside official_devices
77TARGET_DEVICE=$( bash $( pwd) /helpers/latest_device.sh)
88
9- # Just a lil safety check
10- FLAG=$( cat file)
11- if [ " $FLAG " == " 0" ]; then
12- tg_groupcast " Not pushing, only core files updated."
13- exit
14- fi
15-
169# Abort if TARGET_DEVICE equals to changelog.txt or maintainers.json
1710if [ " $TARGET_DEVICE " == " maintainers.json" ] || [ " $TARGET_DEVICE " == " changelog.txt" ]; then
1811 tg_groupcast " Only maintainers.json or changelog.txt has been updated. Ignoring."
1912 exit
2013fi
2114
22- # Another safety check
23- if [ " $DEVICE " == " $TARGET_DEVICE " ]; then
24- echo " Continuing, safety check passed."
25- else
26- tg_groupcast " Something's wrong with the script. Device: ${DEVICE} , Target device: ${TARGET_DEVICE} ."
27- exit
15+ # Just a lil safety check
16+ FLAG=$( cat file)
17+ if [ " $FLAG " == " 0" ]; then
18+ tg_groupcast " Not pushing, only core files updated."
19+ exit
2820fi
2921
3022# Fetch device.json from our github repo
You can’t perform that action at this time.
0 commit comments