File tree Expand file tree Collapse file tree 10 files changed +80
-40
lines changed Expand file tree Collapse file tree 10 files changed +80
-40
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# version_greater A B returns whether A > B
@@ -67,8 +67,10 @@ file_env() {
67
67
local var=" $1 "
68
68
local fileVar=" ${var} _FILE"
69
69
local def=" ${2:- } "
70
- local varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
71
- local fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
70
+ local varValue
71
+ local fileVarValue
72
+ varValue=$( env | grep -E " ^${var} =" | sed -E -e " s/^${var} =//" )
73
+ fileVarValue=$( env | grep -E " ^${fileVar} =" | sed -E -e " s/^${fileVar} =//" )
72
74
if [ -n " ${varValue} " ] && [ -n " ${fileVarValue} " ]; then
73
75
echo >&2 " error: both $var and $fileVar are set (but are exclusive)"
74
76
exit 1
@@ -80,7 +82,6 @@ file_env() {
80
82
elif [ -n " ${def} " ]; then
81
83
export " $var " =" $def "
82
84
fi
83
- unset " $fileVar "
84
85
}
85
86
86
87
if expr " $1 " : " apache" 1> /dev/null; then
@@ -186,12 +187,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
186
187
rsync_options=" -rlD"
187
188
fi
188
189
190
+ # shellcheck disable=SC2086
189
191
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
190
192
for dir in config data custom_apps themes; do
191
193
if [ ! -d " /var/www/html/$dir " ] || directory_empty " /var/www/html/$dir " ; then
194
+ # shellcheck disable=SC2086
192
195
rsync $rsync_options --include " /$dir /" --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
193
196
fi
194
197
done
198
+ # shellcheck disable=SC2086
195
199
rsync $rsync_options --include ' /version.php' --exclude ' /*' /usr/src/nextcloud/ /var/www/html/
196
200
197
201
# Install
You can’t perform that action at this time.
0 commit comments