Skip to content

Instantly share code, notes, and snippets.

@mdPlusPlus
Last active December 11, 2020 09:45
Show Gist options
  • Save mdPlusPlus/ec4eacff30338040ebc91649e0c17ed3 to your computer and use it in GitHub Desktop.
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)
#!/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