Merge pull request #777 from feature/improve-core
This commit is contained in:
11
Makefile
11
Makefile
@@ -5,6 +5,7 @@ PLUGINHOOK_URL ?= https://s3.amazonaws.com/progrium-pluginhook/pluginhook_0.1.0_
|
|||||||
STACK_URL ?= https://github.com/progrium/buildstep.git
|
STACK_URL ?= https://github.com/progrium/buildstep.git
|
||||||
PREBUILT_STACK_URL ?= https://github.com/progrium/buildstep/releases/download/2014-03-08/2014-03-08_429d4a9deb.tar.gz
|
PREBUILT_STACK_URL ?= https://github.com/progrium/buildstep/releases/download/2014-03-08/2014-03-08_429d4a9deb.tar.gz
|
||||||
DOKKU_ROOT ?= /home/dokku
|
DOKKU_ROOT ?= /home/dokku
|
||||||
|
PLUGINS_PATH ?= /var/lib/dokku/plugins
|
||||||
|
|
||||||
# If the first argument is "vagrant-dokku"...
|
# If the first argument is "vagrant-dokku"...
|
||||||
ifeq (vagrant-dokku,$(firstword $(MAKECMDGOALS)))
|
ifeq (vagrant-dokku,$(firstword $(MAKECMDGOALS)))
|
||||||
@@ -23,12 +24,12 @@ install: dependencies stack copyfiles plugin-dependencies plugins version
|
|||||||
|
|
||||||
copyfiles: addman
|
copyfiles: addman
|
||||||
cp dokku /usr/local/bin/dokku
|
cp dokku /usr/local/bin/dokku
|
||||||
mkdir -p /var/lib/dokku/plugins
|
mkdir -p ${PLUGINS_PATH}
|
||||||
find /var/lib/dokku/plugins -mindepth 2 -maxdepth 2 -name '.core' -printf '%h\0' | xargs -0 rm -Rf
|
find ${PLUGINS_PATH} -mindepth 2 -maxdepth 2 -name '.core' -printf '%h\0' | xargs -0 rm -Rf
|
||||||
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do \
|
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do \
|
||||||
rm -Rf /var/lib/dokku/plugins/$$plugin && \
|
rm -Rf ${PLUGINS_PATH}/$$plugin && \
|
||||||
cp -R plugins/$$plugin /var/lib/dokku/plugins && \
|
cp -R plugins/$$plugin ${PLUGINS_PATH} && \
|
||||||
touch /var/lib/dokku/plugins/$$plugin/.core; \
|
touch ${PLUGINS_PATH}/$$plugin/.core; \
|
||||||
done
|
done
|
||||||
|
|
||||||
addman:
|
addman:
|
||||||
|
|||||||
2
dokku
2
dokku
@@ -12,7 +12,7 @@ export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
|
|||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
if [[ $(id -un) != "dokku" && $1 != plugins-install* && $1 != "plugins-update" ]]; then
|
if [[ $(id -un) != "dokku" && $1 != plugins-install* && $1 != "plugins-update" ]]; then
|
||||||
sudo -u dokku -H $0 "$@"
|
sudo -u dokku -E -H $0 "$@"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user