File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,12 @@ function update_script() {
3737
3838 msg_info " Updating $APP to v${RELEASE} "
3939 temp_file=$( mktemp)
40+ temp_folder=$( mktemp -d)
4041 wget -q " https://github.com/sbondCo/Watcharr/archive/refs/tags/v${RELEASE} .tar.gz" -O " $temp_file "
41- tar -xzf " $temp_file "
42+ tar -xzf " $temp_file " -C " $temp_folder "
4243 rm -f /opt/watcharr/server/watcharr
4344 rm -rf /opt/watcharr/server/ui
44- mv Watcharr-${RELEASE} / /opt/watcharr
45+ cp -rf ${temp_folder} / Watcharr-${RELEASE} /* /opt/watcharr
4546 cd /opt/watcharr
4647 export GOOS=linux
4748 npm i & > /dev/null
@@ -58,6 +59,7 @@ function update_script() {
5859
5960 msg_info " Cleaning Up"
6061 rm -f ${temp_file}
62+ rm -rf ${temp_folder}
6163 msg_ok " Cleanup Completed"
6264
6365 echo " ${RELEASE} " > /opt/${APP} _version.txt
You can’t perform that action at this time.
0 commit comments