2022-09-20 21:16:51 +00:00
|
|
|
#!/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) 2022 Fewtarius (https://github.com/fewtarius)
|
|
|
|
|
2022-09-20 21:16:51 +00:00
|
|
|
if [[ "${UI_SERVICE}" =~ ^weston ]]
|
|
|
|
then
|
|
|
|
SHADERS='*.slang*'
|
|
|
|
else
|
2023-02-23 16:20:39 +00:00
|
|
|
SHADERS='*.glslp*'
|
2022-09-20 21:16:51 +00:00
|
|
|
fi
|
|
|
|
|
2022-08-11 01:50:38 +00:00
|
|
|
for dir in /tmp/shaders
|
|
|
|
do
|
|
|
|
if [ -d "${dir}" ]
|
|
|
|
then
|
2022-09-20 21:16:51 +00:00
|
|
|
find ${dir} -name ${SHADERS} -print0 |
|
2022-08-11 01:50:38 +00:00
|
|
|
while IFS= read -r -d '' line; do
|
|
|
|
echo ${line#${dir}/},
|
|
|
|
done
|
|
|
|
fi
|
2022-02-05 14:23:32 +00:00
|
|
|
done
|