2018-05-20 09:39:59 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-03-14 01:15:38 +00:00
|
|
|
if [ ! -d .git ]; then
|
|
|
|
echo Unable to update `pwd`
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
git pull
|
2022-01-09 22:01:18 +00:00
|
|
|
# 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
|
2024-02-20 18:39:34 +00:00
|
|
|
# modification. Check if composer is installed globally or locally
|
2024-02-17 14:16:22 +00:00
|
|
|
# (assuming that locally means in the install folder).
|
2022-01-11 20:06:58 +00:00
|
|
|
if [ `id -u` -eq 0 ]; then
|
2024-02-20 05:54:23 +00:00
|
|
|
echo "Please do not run composer as root."
|
|
|
|
exit;
|
2022-01-11 20:06:58 +00:00
|
|
|
fi
|
2024-02-17 14:16:22 +00:00
|
|
|
if [ $(which composer) ]; then
|
2024-02-20 05:54:23 +00:00
|
|
|
composer install --no-dev --no-interaction
|
2024-02-17 14:16:22 +00:00
|
|
|
else
|
2024-02-20 05:54:23 +00:00
|
|
|
./composer.phar install --no-dev --no-interaction
|
2024-02-17 14:16:22 +00:00
|
|
|
fi
|
2016-03-14 01:15:38 +00:00
|
|
|
if [ -d extend ] ; then
|
|
|
|
for a in theme addon widget ; do
|
2018-12-14 19:36:32 +00:00
|
|
|
if [ -d extend/$a ]; then
|
2016-03-14 01:15:38 +00:00
|
|
|
for b in `ls extend/$a` ; do
|
|
|
|
echo Updating $b
|
|
|
|
'util/update_'$a'_repo' $b
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
2024-02-20 18:39:34 +00:00
|
|
|
# This applies only to K&T Hosting
|
2024-02-20 23:13:52 +00:00
|
|
|
if [ -f /.knthost ]; then
|
2024-02-20 18:39:34 +00:00
|
|
|
touch /system/action/streams.restart
|
|
|
|
fi
|
|
|
|
|