这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ case "$1" in
touch /var/lib/dokku/core-plugins/config.toml /var/lib/dokku/plugins/config.toml

# migrate old plugins
find /var/lib/dokku/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do
find /var/lib/dokku/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
continue
elif [ -f /var/lib/dokku/plugins/$plugin/.core ]; then
Expand All @@ -35,7 +35,7 @@ case "$1" in
done

# enable all core plugins
find /var/lib/dokku/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do
find /var/lib/dokku/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
if [ ! -d /var/lib/dokku/plugins/available/$plugin ]; then
ln -s /var/lib/dokku/core-plugins/available/$plugin /var/lib/dokku/plugins/available/$plugin;
PLUGIN_PATH=/var/lib/dokku/core-plugins plugn enable $plugin
Expand Down
2 changes: 1 addition & 1 deletion dokku
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ case "$1" in

DOKKU_DEFAULT_DOCKER_ARGS=$(: | plugn trigger docker-args-deploy $APP $IMAGE_TAG)

while read line || [[ -n "$line" ]]; do
while read -r line || [[ -n "$line" ]]; do
TRIM=${line%#*}
PROC_TYPE=${TRIM%%=*}
PROC_COUNT=${TRIM#*=}
Expand Down
2 changes: 1 addition & 1 deletion plugins/apps/commands
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ case "$1" in
dokku_log_warn "To proceed, type \"$APP\""
echo ""

read -p "> " app_name
read -rp "> " app_name
if [[ "$app_name" != "$APP" ]]; then
dokku_log_fail "Confirmation did not match $APP. Aborted."
fi
Expand Down
2 changes: 1 addition & 1 deletion plugins/backup/commands
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ case "$1" in
fi

# create all the app directories
while read app; do mkdir "$TARGET_DIR/$app"; echo "Imported $app"; done < $BACKUP_TMP_DIR/.dokku_backup_apps
while read -r app; do mkdir "$TARGET_DIR/$app"; echo "Imported $app"; done < $BACKUP_TMP_DIR/.dokku_backup_apps

# have the plugins import their stuff
plugn trigger backup-import $VERSION "$BACKUP_ROOT" $TARGET_DIR "$BACKUP_TMP_DIR/.dokku_backup_apps"
Expand Down
4 changes: 2 additions & 2 deletions plugins/checks/check-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fi

# Reads name/value pairs, sets the WAIT and TIMEOUT variables
exec < "$FILENAME"
while read LINE; do
while read -r LINE; do
# Name/value pair
if [[ "$LINE" =~ ^.+= ]]; then
TRIM=${LINE%#*}
Expand Down Expand Up @@ -143,7 +143,7 @@ do
fi

exec < "$FILENAME"
while read CHECK_URL EXPECTED; do
while read -r CHECK_URL EXPECTED; do
# Ignore empty lines and lines starting with #
# shellcheck disable=SC1001
[[ -z "$CHECK_URL" || "$CHECK_URL" =~ ^\# ]] && continue
Expand Down
2 changes: 1 addition & 1 deletion plugins/docker-options/docker-args-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ output=""
if [[ -f "$PHASE_FILE_PATH" ]]; then
DONE=false
until $DONE; do
read line || DONE=true
read -r line || DONE=true

[[ ! -n "$line" ]] && continue

Expand Down
2 changes: 1 addition & 1 deletion plugins/git/backup-import
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ IMPORT_DIR="$2"
TARGET_DIR="$3"
APPS="$4"

while read APP; do
while read -r APP; do
APP_PATH="$TARGET_DIR/$APP";
git init --bare $APP_PATH > /dev/null
PRERECEIVE_HOOK="$APP_PATH/hooks/pre-receive"
Expand Down
2 changes: 1 addition & 1 deletion plugins/git/commands
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ case "$1" in
git-hook)
APP=$2

while read oldrev newrev refname; do
while read -r oldrev newrev refname; do
# Only run this script for the master branch. You can remove this
# if block if you wish to run it for others as well.
if [[ $refname = "refs/heads/master" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion plugins/nginx-vhosts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ EOF
local NGINX_SSL_PORT=$DOKKU_NGINX_SSL_PORT
fi

while read line; do
while read -r line; do
[[ -z "$line" ]] && continue
dokku_log_info1 "Configuring SSL for $line..."
SSL_SERVER_NAME=$line
Expand Down
2 changes: 1 addition & 1 deletion plugins/ps/commands
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ case "$1" in
dokku_log_info1_quiet "Scaling for $APP"
dokku_col_log_info1_quiet "proctype" "qty"
dokku_col_log_info1_quiet "--------" "---"
while read line || [[ -n "$line" ]]; do
while read -r line || [[ -n "$line" ]]; do
[[ -z "$line" ]] && continue
PROC_NAME=${line%%=*}
PROC_COUNT=${line#*=}
Expand Down
4 changes: 2 additions & 2 deletions plugins/ps/functions
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"

print_dokku_scale_file() {
local APP="$1"; local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
while read line || [[ -n "$line" ]]; do
while read -r line || [[ -n "$line" ]]; do
dokku_log_info2_quiet "$line"
done < "$DOKKU_SCALE_FILE"
}
Expand All @@ -25,7 +25,7 @@ generate_scale_file() {
if [[ ! -e "$PROCFILE" ]]; then
echo "web=1" >> $DOKKU_SCALE_FILE
else
while read line || [[ -n "$line" ]]; do
while read -r line || [[ -n "$line" ]]; do
[[ -z "$line" ]] && continue
NAME=${line%%:*}
NUM_PROCS=0
Expand Down
2 changes: 1 addition & 1 deletion plugins/shell/commands
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ case "$1" in

while true; do
trap '' SIGINT
read -ep "dokku> " line || {
read -rep "dokku> " line || {
echo; true; break
}
trap - SIGINT
Expand Down