summaryrefslogtreecommitdiff
path: root/listisos.sh
blob: f7124c136cb229e00254292e3f8523267faad952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# Copyright (C)  2016-2018 Iru Cai <mytbk920423@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later

ISOINFOS=($(find distro -name isoinfo))
for _isoinfo in "${ISOINFOS[@]}"
do
	_distrobase="$(cut -d'/' -f1-2 <<< "$_isoinfo")"
	_distroisodir="$(dirname $_isoinfo | cut -d'/' -f2-)"
	if [ -f "$_distrobase/distroinfo" ]; then
		source "$_distrobase/distroinfo"
	else
		continue
	fi
	source "$_isoinfo"
	if [ -n "$ISONAME" ]; then
		echo "$_distroisodir: $ISONAME"
	fi
done