summaryrefslogtreecommitdiffstats
path: root/makeself
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-04-02 12:37:13 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-04-02 12:37:13 +0300
commitba23cb33394be26356fe6ac74579ed62b785a83a (patch)
tree9496f779e0c6bcf2b3acf7a2b37b8b1bf6b04985 /makeself
parent55f77f0823b0ece6b1fbd37409d3da7a6f2c7f65 (diff)
copy all etc.new files to destination; enable iterative tty for docker
Diffstat (limited to 'makeself')
-rwxr-xr-xmakeself/build-x86_64-static.sh4
-rwxr-xr-xmakeself/build.sh2
-rwxr-xr-xmakeself/install-or-update.sh13
-rwxr-xr-xmakeself/jobs/99-makeself.install.sh11
4 files changed, 18 insertions, 12 deletions
diff --git a/makeself/build-x86_64-static.sh b/makeself/build-x86_64-static.sh
index 2248ad76ce..0516beae2c 100755
--- a/makeself/build-x86_64-static.sh
+++ b/makeself/build-x86_64-static.sh
@@ -28,7 +28,9 @@ then
fi
# Run the build script inside the container
-sudo docker run -v $(pwd):/usr/src/netdata.git:rw "${DOCKER_CONTAINER_NAME}" \
+sudo docker run -a stdin -a stdout -a stderr -i -t -v \
+ $(pwd):/usr/src/netdata.git:rw \
+ "${DOCKER_CONTAINER_NAME}" \
/bin/sh /usr/src/netdata.git/makeself/build.sh
if [ "${USER}" ]
diff --git a/makeself/build.sh b/makeself/build.sh
index eee77f77f5..7896425d7e 100755
--- a/makeself/build.sh
+++ b/makeself/build.sh
@@ -27,7 +27,7 @@ target Linux system cannot compile netdata.
EOF
-read -p "Press ENTER to continue > "
+# read -p "Press ENTER to continue > "
if [ ! -d tmp ]
then
diff --git a/makeself/install-or-update.sh b/makeself/install-or-update.sh
index 658d408f79..b1cc68b76b 100755
--- a/makeself/install-or-update.sh
+++ b/makeself/install-or-update.sh
@@ -21,11 +21,11 @@ if [ ! -d etc/netdata ]
fi
md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null || command -v md5 2>/dev/null)"
-for x in $(find etc/netdata.new -name '*.conf' -type f)
+for x in $(find etc.new -type f)
do
# find it relative filename
- f="${x/*etc\/netdata.new\//}"
- t="${x/*etc\/netdata.new\//etc\/netdata\/}"
+ f="${x/etc.new\//}"
+ t="${x/etc.new\//etc\/}"
d=$(dirname "${t}")
#echo >&2 "x: ${x}"
@@ -56,10 +56,13 @@ do
fi
fi
- run mv "${x}" "${t}.orig"
+ if ! [[ "${x}" =~ .*\.orig ]]
+ then
+ run mv "${x}" "${t}.orig"
+ fi
done
-run rm -rf etc/netdata.new
+run rm -rf etc.new
# -----------------------------------------------------------------------------
diff --git a/makeself/jobs/99-makeself.install.sh b/makeself/jobs/99-makeself.install.sh
index 5bdc88576c..9d5a34b3a1 100755
--- a/makeself/jobs/99-makeself.install.sh
+++ b/makeself/jobs/99-makeself.install.sh
@@ -41,15 +41,15 @@ chmod 755 "${NETDATA_INSTALL_PATH}/bin/netdata"
# -----------------------------------------------------------------------------
# move etc to protect the destination when unpacked
-if [ -d "${NETDATA_INSTALL_PATH}/etc/netdata" ]
+if [ -d "${NETDATA_INSTALL_PATH}/etc" ]
then
- if [ -d "${NETDATA_INSTALL_PATH}/etc/netdata.new" ]
+ if [ -d "${NETDATA_INSTALL_PATH}/etc.new" ]
then
- rm -rf "${NETDATA_INSTALL_PATH}/etc/netdata.new" || exit 1
+ rm -rf "${NETDATA_INSTALL_PATH}/etc.new" || exit 1
fi
- mv "${NETDATA_INSTALL_PATH}/etc/netdata" \
- "${NETDATA_INSTALL_PATH}/etc/netdata.new" || exit 1
+ mv "${NETDATA_INSTALL_PATH}/etc" \
+ "${NETDATA_INSTALL_PATH}/etc.new" || exit 1
fi
@@ -81,6 +81,7 @@ rm "${NETDATA_INSTALL_PATH}/sbin" \
./system/post-installer.sh \
${NULL}
+
# -----------------------------------------------------------------------------
# copy it to the netdata build dir
cp "${NETDATA_INSTALL_PATH}.gz.run" .