Last active
December 11, 2020 09:45
-
-
Save mdPlusPlus/ec4eacff30338040ebc91649e0c17ed3 to your computer and use it in GitHub Desktop.
Provides a textfile with all officially supported LineageOS devices to import into a spreadsheet (LibreOffice calc)
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 | |
table_file=./table.txt | |
echo "wait" | |
echo -n "" > $table_file | |
wget -q https://github.com/LineageOS/lineage_wiki/archive/master.zip | |
unzip -q master.zip | |
rm master.zip | |
for filename in ./lineage_wiki-master/_data/devices/*.yml; do | |
while read line; do | |
if [[ $line == codename* ]] || [[ $line == current_branch* ]] || [[ $line == name* ]] || [[ $line == type* ]] || [[ $line == vendor* ]] || [[ $line == versions* ]] | |
then | |
echo -n $line\| >> $table_file | |
fi | |
done <$filename | |
if [[ $line != *"channels: [discontinued]"* ]] | |
then | |
echo >> $table_file | |
fi | |
done | |
rm -r ./lineage_wiki-master | |
echo "finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment