forked from ungleich-public/cdist-contrib
__matrix_riot: improve friendship with shellcheck
This commit is contained in:
parent
f6a36a60c0
commit
3314612193
3 changed files with 7 additions and 8 deletions
|
@ -4,7 +4,7 @@
|
|||
# https://github.com/vector-im/riot-web/blob/develop/docs/config.md
|
||||
|
||||
generate_embedded_pages () {
|
||||
if [ $EMBED_HOMEPAGE ]; then
|
||||
if [ "$EMBED_HOMEPAGE" != "" ]; then
|
||||
cat << EOF
|
||||
"embeddedPages": {
|
||||
"homeUrl": "home.html"
|
||||
|
|
|
@ -24,10 +24,6 @@ OWNER=$(cat "$__object/parameter/owner")
|
|||
|
||||
src="riot-v$VERSION"
|
||||
archive="$src.tar.gz"
|
||||
config='config.json'
|
||||
homepage='home.html'
|
||||
welcomepage='welcome.html'
|
||||
welcomelogo='welcome-logo.svg'
|
||||
url="https://github.com/vector-im/riot-web/releases/download/v$VERSION/$archive"
|
||||
|
||||
# tar and curl are installed by the __matrix-riot manifest. mktemp is usually
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Ignore "Declare and assign separately to avoid masking return values. [SC2155]"
|
||||
# => not relevant for the type arguments.
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
INSTALL_DIR=$(cat "$__object/parameter/install_dir")
|
||||
|
||||
|
@ -51,8 +54,8 @@ if [ -f "$__object/parameter/welcomepage" ]; then
|
|||
fi
|
||||
|
||||
if [ -f "$__object/parameter/custom_asset" ]; then
|
||||
for file in $(cat "$__object/parameter/custom_asset"); do
|
||||
require="__directory/$INSTALL_DIR/cdist" __file "$INSTALL_DIR/cdist/$(basename $file)" \
|
||||
"$__object/parameter/custom_asset" | while IFS= read -r file; do
|
||||
require="__directory/$INSTALL_DIR/cdist" __file "$INSTALL_DIR/cdist/$(basename "$file")" \
|
||||
--source "$file" \
|
||||
--mode 0664 \
|
||||
--state present
|
||||
|
|
Loading…
Reference in a new issue