mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
35 lines
908 B
Bash
Executable file
35 lines
908 B
Bash
Executable file
#!/usr/bin/env bash
|
|
if [ ! -d .git ]; then
|
|
echo Unable to update `pwd`
|
|
exit
|
|
fi
|
|
git pull
|
|
# use composer install so that the current composer.lock
|
|
# is always used. If this was an update command, it would
|
|
# update composer.lock and create an unintentional local file
|
|
# modification. Check if composer is installed globally or locally
|
|
# (assuming that locally means in the install folder).
|
|
if [ `id -u` -eq 0 ]; then
|
|
echo "Please do not run composer as root."
|
|
exit;
|
|
fi
|
|
if [ $(which composer) ]; then
|
|
composer install --no-dev --no-interaction
|
|
else
|
|
./composer.phar install --no-dev --no-interaction
|
|
fi
|
|
if [ -d extend ] ; then
|
|
for a in theme addon widget ; do
|
|
if [ -d extend/$a ]; then
|
|
for b in `ls extend/$a` ; do
|
|
echo Updating $b
|
|
'util/update_'$a'_repo' $b
|
|
done
|
|
fi
|
|
done
|
|
fi
|
|
# This applies only to K&T Hosting
|
|
if [ -f /.knthost ]; then
|
|
touch /system/action/streams.restart
|
|
fi
|
|
|