Skip to content

Commit

Permalink
[Fix]: Fixed rm Bug in pf2etools (#1292)
Browse files Browse the repository at this point in the history
* [Fix]: Fixed rm Bug in pf2etools

* Update pf2etools.sh
  • Loading branch information
MickLesk authored Jan 6, 2025
1 parent f98d81f commit 4888c33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 4 additions & 5 deletions ct/pf2etools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,14 @@ function update_script() {

# Execute Update
msg_info "Updating ${APP}"
cd "/opt/${APP}"
cd /opt
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
unzip -q "${RELEASE}.zip"
unzip -q ${RELEASE}.zip
rm -rf "/opt/${APP}"
mv "${APP}-${RELEASE:1}" "/opt/${APP}"
mv ${APP}-${RELEASE:1} /opt/${APP}
cd /opt/Pf2eTools
$STD npm install
$STD npm run build
cd ~
echo "${RELEASE}" >"/opt/${APP}_version.txt"
msg_ok "Updated ${APP}"

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

# Cleaning up
msg_info "Cleaning Up"
rm -rf /opt/${APP}/${RELEASE}.zip
rm -rf /opt/${RELEASE}.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleanup Completed"
Expand Down
3 changes: 2 additions & 1 deletion install/pf2etools-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ msg_ok "Installed Node.js"

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

# Cleanup
msg_info "Cleaning up"
rm "${RELEASE}.zip"
rm -rf /opt/${RELEASE}.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
Expand Down

0 comments on commit 4888c33

Please sign in to comment.