Skip to content

Commit 4888c33

Browse files
authored
[Fix]: Fixed rm Bug in pf2etools (#1292)
* [Fix]: Fixed rm Bug in pf2etools * Update pf2etools.sh
1 parent f98d81f commit 4888c33

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ct/pf2etools.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ function update_script() {
4545

4646
# Execute Update
4747
msg_info "Updating ${APP}"
48-
cd "/opt/${APP}"
48+
cd /opt
4949
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
50-
unzip -q "${RELEASE}.zip"
50+
unzip -q ${RELEASE}.zip
5151
rm -rf "/opt/${APP}"
52-
mv "${APP}-${RELEASE:1}" "/opt/${APP}"
52+
mv ${APP}-${RELEASE:1} /opt/${APP}
5353
cd /opt/Pf2eTools
5454
$STD npm install
5555
$STD npm run build
56-
cd ~
5756
echo "${RELEASE}" >"/opt/${APP}_version.txt"
5857
msg_ok "Updated ${APP}"
5958

@@ -62,7 +61,7 @@ function update_script() {
6261

6362
# Cleaning up
6463
msg_info "Cleaning Up"
65-
rm -rf /opt/${APP}/${RELEASE}.zip
64+
rm -rf /opt/${RELEASE}.zip
6665
$STD apt-get -y autoremove
6766
$STD apt-get -y autoclean
6867
msg_ok "Cleanup Completed"

install/pf2etools-install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ msg_ok "Installed Node.js"
3838

3939
# Setup App
4040
msg_info "Setup Pf2eTools"
41+
cd /opt
4142
RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
4243
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
4344
unzip -q "${RELEASE}.zip"
@@ -65,7 +66,7 @@ msg_ok "Created Service"
6566

6667
# Cleanup
6768
msg_info "Cleaning up"
68-
rm "${RELEASE}.zip"
69+
rm -rf /opt/${RELEASE}.zip
6970
$STD apt-get -y autoremove
7071
$STD apt-get -y autoclean
7172
msg_ok "Cleaned"

0 commit comments

Comments
 (0)