Skip to content
Snippets Groups Projects
Commit 3842ad29 authored by Jordon Bedwell's avatar Jordon Bedwell
Browse files

Try to work around most gem/bundle permission errors the easy way.

parent d57ae00a
Branches
Tags
No related merge requests found
#!/bin/bash #!/bin/bash
[ "$DEBUG" = "true" ] && set -x [ "$DEBUG" = "true" ] && set -x
exe=/usr/local/bin/bundle exe=/usr/local/bin/bundle
default-gem-permissions
set -e set -e
# #
...@@ -12,17 +13,6 @@ if [[ ! -f "Gemfile" ]] || [ "$(id -u)" != "0" ]; then ...@@ -12,17 +13,6 @@ if [[ ! -f "Gemfile" ]] || [ "$(id -u)" != "0" ]; then
exec $exe "$@" exec $exe "$@"
fi fi
#
# Make sure we have permissions.
#
if [ "$1" = "install" ] || [ "$1" = "clean" ] || [ "$1" = "update" ]; then
if [ "$(stat -c '%U' "$BUNDLE_HOME")" != "jekyll" ]; then
chown -R jekyll:jekyll "$BUNDLE_HOME"
chown -R jekyll:jekyll /usr/gem
fi
fi
if [ "$1" = "install" ] || [ "$1" = "update" ]; then if [ "$1" = "install" ] || [ "$1" = "update" ]; then
# There is no need to report that we are using check. # There is no need to report that we are using check.
if [ "$1" = "update" ] || ! su-exec jekyll $exe check 1>/dev/null 2>&1; then if [ "$1" = "update" ] || ! su-exec jekyll $exe check 1>/dev/null 2>&1; then
......
#!/bin/bash
[ "$DEBUG" = "true" ] && set -x
set -e
if [ "$(id -u)" = "0" ]; then
chown -R jekyll:jekyll "$BUNDLE_HOME"
chown -R jekyll:jekyll /usr/gem
fi
#!/bin/bash
[ "$DEBUG" = "true" ] && set -x
default-gem-permissions
exe=/usr/local/bin/gem
set -e
exec $exe "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment