Skip to content
Snippets Groups Projects
Commit 448a5bc0 authored by an7s's avatar an7s
Browse files

Clean install - erase tmp files when done

Former-commit-id: c57134e397f750c4db0f587fbfce7c996e6beb75
parent 1c4f3567
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,9 @@ echo "Type any key to continue"
read anykey
# in case it's not there yet
mkdir -p $INSTALL_DIR
if [ ! -d "$INSTALL_DIR" ]; then
mkdir -p $INSTALL_DIR
fi
chmod +x ./a.stratafied
......@@ -49,20 +51,42 @@ if [ -d "$INSTALL_DIR/${PROG}_analysis" ]; then
rm -fr "$INSTALL_DIR/${PROG}_analysis"
fi
# copy the peasoup dir
cp -r . $INSTALL_DIR/${PROG}_analysis
#mv analysis_dir $INSTALL_DIR/${PROG}_analysis
echo "$INSTALL_DIR/${PROG}_analysis/ps_run.sh $INSTALL_DIR/${PROG}_analysis \"\$0\" \"\$@\"" > $INSTALL_DIR/$PROG
chmod +x $INSTALL_DIR/$PROG
create_desktop_shortcut ${PROG} ${INSTALL_DIR}/${PROG}
# if X11 applications detected, create desktop shortcut
ldd ./a.ncexe.orig | grep X11 >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo Desktop shortcut succesfully created in $DESKTOP_ZEPHYR_DIR
else
echo Could not create desktop shortcut in $DESKTOP_ZEPHYR_DIR
create_desktop_shortcut ${PROG} ${INSTALL_DIR}/${PROG}
if [ $? -eq 0 ]; then
echo X application detected - desktop shortcut succesfully created in $DESKTOP_ZEPHYR_DIR
else
echo Could not create desktop shortcut in $DESKTOP_ZEPHYR_DIR
fi
fi
echo ""
echo ================================================================
echo "Installation complete"
echo ================================================================
# cleanup
#
# note that we are in the archive
#
# save current dir
current_dir=$(pwd)
# remove files in the current directory
rm -r *
# get out of current dir so that we can erase it
cd /tmp
rmdir "${current_dir}"
# remove temporary installer
rm -f /tmp/${PROG}.installer
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment