distribution/packages/jelos/sources/scripts/getshaders

24 lines
508 B
Text
Raw Normal View History

#!/bin/bash
. /etc/profile
2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
2022-02-05 14:23:32 +00:00
2024-01-04 05:44:29 +00:00
if [ -z "$UI_SHADER" ]; then
option=".*\.\(glslp\|slangp\)$"
else
2024-01-04 05:44:29 +00:00
option=".*\.\($UI_SHADER\)$"
fi
for dir in /tmp/shaders
do
2024-01-04 05:44:29 +00:00
if [ -d "${dir}" ]; then
find ${dir} -regex "${option}" -print0 |
while IFS= read -r -d '' line; do
echo ${line#${dir}/},
done
fi
2022-02-05 14:23:32 +00:00
done