__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
|
# https://github.com/vector-im/riot-web/blob/develop/docs/config.md
|
||||||
|
|
||||||
generate_embedded_pages () {
|
generate_embedded_pages () {
|
||||||
if [ $EMBED_HOMEPAGE ]; then
|
if [ "$EMBED_HOMEPAGE" != "" ]; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
"embeddedPages": {
|
"embeddedPages": {
|
||||||
"homeUrl": "home.html"
|
"homeUrl": "home.html"
|
||||||
|
|
|
@ -24,10 +24,6 @@ OWNER=$(cat "$__object/parameter/owner")
|
||||||
|
|
||||||
src="riot-v$VERSION"
|
src="riot-v$VERSION"
|
||||||
archive="$src.tar.gz"
|
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"
|
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
|
# 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
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
# 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")
|
INSTALL_DIR=$(cat "$__object/parameter/install_dir")
|
||||||
|
|
||||||
|
@ -51,8 +54,8 @@ if [ -f "$__object/parameter/welcomepage" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$__object/parameter/custom_asset" ]; then
|
if [ -f "$__object/parameter/custom_asset" ]; then
|
||||||
for file in $(cat "$__object/parameter/custom_asset"); do
|
"$__object/parameter/custom_asset" | while IFS= read -r file; do
|
||||||
require="__directory/$INSTALL_DIR/cdist" __file "$INSTALL_DIR/cdist/$(basename $file)" \
|
require="__directory/$INSTALL_DIR/cdist" __file "$INSTALL_DIR/cdist/$(basename "$file")" \
|
||||||
--source "$file" \
|
--source "$file" \
|
||||||
--mode 0664 \
|
--mode 0664 \
|
||||||
--state present
|
--state present
|
||||||
|
|
Loading…
Reference in a new issue