You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

makeInstallerLinux.sh 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. #!/bin/sh
  2. #
  3. # This script generates a .run file that will install DMDirc
  4. #
  5. # DMDirc - Open Source IRC Client
  6. # Copyright (c) 2006-2008 Chris Smith, Shane Mc Cormack, Gregory Holmes
  7. #
  8. # Permission is hereby granted, free of charge, to any person obtaining a copy
  9. # of this software and associated documentation files (the "Software"), to deal
  10. # in the Software without restriction, including without limitation the rights
  11. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. # copies of the Software, and to permit persons to whom the Software is
  13. # furnished to do so, subject to the following conditions:
  14. #
  15. # The above copyright notice and this permission notice shall be included in
  16. # all copies or substantial portions of the Software.
  17. #
  18. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  24. # SOFTWARE.
  25. # Final Name of the installer (without file extention)
  26. INSTALLERNAME=DMDirc-Setup
  27. # Location of .run stub start
  28. STARTLINE=`grep -n "^###START INCLUDE###$" $0`
  29. STARTLINE=$((${STARTLINE%%:*} + 1))
  30. # full name of the file to output to
  31. RUNNAME="${PWD}/${INSTALLERNAME}.run"
  32. # Compress stuff!
  33. compress() {
  34. tar cvfh - $@ | gzip - 2>/dev/null >>${RUNNAME} || {
  35. echo "Compression failed."
  36. kill -15 $$;
  37. };
  38. }
  39. # Go!
  40. echo "-----------"
  41. if [ -e "${RUNNAME}" ]; then
  42. echo "Removing existing .run file"
  43. rm -Rf ./*.run
  44. fi
  45. showHelp() {
  46. echo "This will generate a DMDirc installer for a unix based system."
  47. echo "The following command line arguments are known:"
  48. echo "---------------------"
  49. echo "-h, --help Help information"
  50. echo "-r, --release <version> Generate a file based on an svn tag (or branch with -b aswell)"
  51. echo "-b, --branch Release in -r is a branch "
  52. echo "-p, --plugins <plugins> What plugins to add to the jar file"
  53. echo "-c, --compile Recompile the .jar file"
  54. echo " --jre Include the JRE in this installer"
  55. echo " --jre64 Include the 64-Bit JRE in this installer"
  56. echo " --jar <file> use <file> as DMDirc.jar"
  57. echo " --current Use the current folder as the base for the build"
  58. echo "-t, --tag <tag> Tag to add to final exe name to distinguish this build from a standard build"
  59. echo "-k, --keep Keep the existing source tree when compiling"
  60. echo " (don't svn update beforehand)"
  61. echo "---------------------"
  62. exit 0;
  63. }
  64. # Check for some CLI params
  65. compileJar="false"
  66. updateSVN="true"
  67. isRelease=""
  68. finalTag=""
  69. BRANCH="0"
  70. plugins=""
  71. location="../../../"
  72. jarfile=""
  73. current=""
  74. jre=""
  75. jrename="jre" # Filename for JRE without the .bin
  76. while test -n "$1"; do
  77. case "$1" in
  78. --plugins|-p)
  79. shift
  80. plugins=${1}
  81. ;;
  82. --jar)
  83. shift
  84. jarfile=${1}
  85. ;;
  86. --jre)
  87. jre="http://www.dmdirc.com/getjava/linux/i686"
  88. ;;
  89. --jre64)
  90. jre="http://www.dmdirc.com/getjava/linux/x86_64"
  91. jrename="jre64"
  92. ;;
  93. --current)
  94. location="../../"
  95. current="1"
  96. ;;
  97. --compile|-c)
  98. compileJar="true"
  99. ;;
  100. --release|-r)
  101. shift
  102. isRelease=${1}
  103. ;;
  104. --tag|-t)
  105. shift
  106. finalTag=${1}
  107. RUNNAME="${PWD}/${INSTALLERNAME}-${1}.run"
  108. ;;
  109. --keep|-k)
  110. updateSVN="false"
  111. ;;
  112. --help|-h)
  113. showHelp;
  114. ;;
  115. --branch|-b)
  116. BRANCH="1"
  117. ;;
  118. esac
  119. shift
  120. done
  121. if [ "" = "${current}" ]; then
  122. jarPath="${location}trunk"
  123. else
  124. jarPath="${location}"
  125. fi
  126. if [ "${isRelease}" != "" ]; then
  127. if [ "${BRANCH}" != "0" ]; then
  128. if [ -e "${location}/${isRelease}" ]; then
  129. jarPath="${location}/${isRelease}"
  130. else
  131. echo "Branch "${isRelease}" not found."
  132. exit 1;
  133. fi
  134. else
  135. if [ -e "${location}/${isRelease}" ]; then
  136. jarPath="${location}/${isRelease}"
  137. else
  138. echo "Tag "${isRelease}" not found."
  139. exit 1;
  140. fi
  141. fi
  142. fi
  143. if [ "" = "${jarfile}" ]; then
  144. jarfile=${jarPath}"/dist/DMDirc.jar"
  145. if [ ! -e ${jarPath}"/dist/DMDirc.jar" -o "${compileJar}" = "true" ]; then
  146. echo "Creating jar.."
  147. OLDPWD=${PWD}
  148. cd ${jarPath}
  149. if [ "${updateSVN}" = "true" ]; then
  150. svn update
  151. fi
  152. rm -Rf build dist
  153. ant jar
  154. if [ ! -e "dist/DMDirc.jar" ]; then
  155. echo "There was an error creating the .jar file. Aborting."
  156. exit 1;
  157. fi;
  158. cd ${OLDPWD}
  159. fi;
  160. elif [ ! -e "${jarfile}" ]; then
  161. echo "Requested Jar file (${jarfile}) does not exist."
  162. exit 1;
  163. fi;
  164. if [ "" = "${plugins}" ]; then
  165. echo "Linking jar (${jarfile}).."
  166. ln -sf ${jarfile} "./DMDirc.jar"
  167. else
  168. echo "Copying jar (${jarfile}).."
  169. cp ${jarfile} "./DMDirc.jar"
  170. echo "Adding plugins to jar"
  171. ln -sf ${jarPath}"/plugins"
  172. pluginList=""
  173. for plugin in ${plugins}; do
  174. pluginList=${pluginList}" plugins/${plugin}"
  175. done
  176. jar -uvf "DMDirc.jar" ${pluginList}
  177. rm -Rf plugins;
  178. fi
  179. echo "Creating .run file"
  180. echo "Adding stub.."
  181. tail -n +${STARTLINE} $0 > ${RUNNAME}
  182. # Add release info.
  183. awk '{gsub(/###ADDITIONAL_STUFF###/,"isRelease=\"'${isRelease}'\"");print}' ${RUNNAME} > ${RUNNAME}.tmp
  184. mv ${RUNNAME}.tmp ${RUNNAME}
  185. FILES="DMDirc.jar";
  186. echo "Compressing files.."
  187. for FILE in "getjre.sh" "installjre.sh" "progressbar.sh"; do
  188. if [ -e "${FILE}" ]; then
  189. FILES="${FILES} ${FILE}"
  190. fi
  191. done;
  192. if [ "" != "${jre}" ]; then
  193. if [ ! -e "../common/${jrename}.bin" ]; then
  194. echo "Downloading JRE to include in installer"
  195. wget ${jre} -O ../common/${jrename}.bin
  196. fi
  197. ln -sf ../common/${jrename}.bin jre.bin
  198. FILES="${FILES} jre.bin"
  199. fi;
  200. if [ -e "setup.sh" ]; then
  201. FILES="${FILES} setup.sh"
  202. else
  203. echo "[WARNING] Creating setup-less archive. This will just extract and immediately delete the .jar file unless the -e flag is used"
  204. fi
  205. if [ -e "../common/installer.jar" ]; then
  206. ln -sf ../common/installer.jar ./installer.jar
  207. FILES="${FILES} installer.jar"
  208. else
  209. echo "[WARNING] Creating installer-less archive - relying on setup.sh"
  210. fi
  211. if [ -e ${jarPath}"/src/com/dmdirc/res/source/logo.svg" ]; then
  212. ln -sf ${jarPath}"/src/com/dmdirc/res/source/logo.svg" ./icon.svg
  213. FILES="${FILES} icon.svg"
  214. fi
  215. if [ "${isRelease}" != "" ]; then
  216. DOCSDIR=${jarPath}
  217. else
  218. DOCSDIR="../common"
  219. fi
  220. if [ -e "${DOCSDIR}/README.TXT" ]; then
  221. ln -sf "${DOCSDIR}/README.TXT" .
  222. FILES="${FILES} README.TXT"
  223. fi
  224. if [ -e "${DOCSDIR}/CHANGES.TXT" ]; then
  225. ln -sf "${DOCSDIR}/CHANGES.TXT" .
  226. FILES="${FILES} CHANGES.TXT"
  227. elif [ -e "${DOCSDIR}/CHANGELOG.TXT" ]; then
  228. ln -sf "${DOCSDIR}/CHANGELOG.TXT" .
  229. FILES="${FILES} CHANGELOG.TXT"
  230. fi
  231. if [ -e "${jarPath}/launcher/linux" ]; then
  232. ln -sf ${jarPath}/launcher/linux/DMDirc.sh .
  233. FILES="${FILES} DMDirc.sh"
  234. fi
  235. compress $FILES
  236. MD5BIN=`which md5sum`
  237. AWK=`which awk`
  238. getMD5() {
  239. # Everything below the MD5SUM Line
  240. MD5LINE=`grep -na "^MD5=\".*\"$" ${1}`
  241. MD5LINE=$((${MD5LINE%%:*} + 1))
  242. MD5SUM=`tail -n +${MD5LINE} "${1}" | ${MD5BIN} - | ${AWK} '{print $1}'`
  243. return;
  244. }
  245. if [ "${MD5BIN}" != "" -a "${AWK}" != "" ]; then
  246. echo "Adding MD5.."
  247. MD5SUM=""
  248. getMD5 ${RUNNAME} ${MD5SUM}
  249. echo "SUM obtained is: ${MD5SUM}"
  250. LINENUM=`grep -na "^MD5=\"\"$" ${RUNNAME}`
  251. LINENUM=${LINENUM%%:*}
  252. head -n $((${LINENUM} -1)) ${RUNNAME} > ${RUNNAME}.tmp
  253. echo 'MD5="'${MD5SUM}'"' >> ${RUNNAME}.tmp
  254. tail -n +$((${LINENUM} +1)) ${RUNNAME} >> ${RUNNAME}.tmp
  255. mv ${RUNNAME}.tmp ${RUNNAME}
  256. else
  257. echo "Not Adding MD5.."
  258. fi;
  259. echo "Chmodding"
  260. chmod a+x ${RUNNAME}
  261. if [ "${isRelease}" != "" ]; then
  262. if [ "${BRANCH}" = "1" ]; then
  263. isRelease=branch-${isRelease}
  264. fi;
  265. if [ "" != "${finalTag}" ]; then
  266. finalTag="-${finalTag}"
  267. fi;
  268. finalname=DMDirc-${isRelease}-Setup${finalTag}.run
  269. else
  270. finalname=${RUNNAME##*/}
  271. fi;
  272. if [ "" != "${jre}" ]; then
  273. finalname=`echo ${finalname} | sed "s/.run$/.${jrename}.run/"`
  274. fi;
  275. mv ${RUNNAME} ../output/${finalname}
  276. mv setup.sh setup.sh.tmp
  277. mv getjre.sh getjre.sh.tmp
  278. mv installjre.sh installjre.sh.tmp
  279. mv progressbar.sh progressbar.sh.tmp
  280. rm -f ${FILES}
  281. mv setup.sh.tmp setup.sh
  282. mv getjre.sh.tmp getjre.sh
  283. mv installjre.sh.tmp installjre.sh
  284. mv progressbar.sh.tmp progressbar.sh
  285. echo "-----------"
  286. echo "Done."
  287. echo "-----------"
  288. # and Done \o
  289. exit 0;
  290. ### Everything below here is part of the .run stub.
  291. ###START INCLUDE###
  292. #!/bin/sh
  293. #
  294. # This script installs dmdirc
  295. #
  296. # DMDirc - Open Source IRC Client
  297. # Copyright (c) 2006-2008 Chris Smith, Shane Mc Cormack, Gregory Holmes
  298. #
  299. # Permission is hereby granted, free of charge, to any person obtaining a copy
  300. # of this software and associated documentation files (the "Software"), to deal
  301. # in the Software without restriction, including without limitation the rights
  302. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  303. # copies of the Software, and to permit persons to whom the Software is
  304. # furnished to do so, subject to the following conditions:
  305. #
  306. # The above copyright notice and this permission notice shall be included in
  307. # all copies or substantial portions of the Software.
  308. #
  309. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  310. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  311. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  312. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  313. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  314. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  315. # SOFTWARE.
  316. MD5=""
  317. # Check the which command exists
  318. WHICH=`which`
  319. if [ "" != "${WHICH}" ]; then
  320. echo "which command not found. Aborting.";
  321. exit 0;
  322. fi
  323. ###ADDITIONAL_STUFF###
  324. errordialog() {
  325. # Send message to console.
  326. echo ""
  327. echo "-----------------------------------------------------------------------"
  328. echo "Error: ${1}"
  329. echo "-----------------------------------------------------------------------"
  330. echo "${2}"
  331. echo "-----------------------------------------------------------------------"
  332. # Now try to use the GUI Dialogs.
  333. ISKDE=`pidof -x -s kdeinit`
  334. KDIALOG=`which kdialog`
  335. ISGNOME=`pidof -x -s gnome-panel`
  336. ZENITY=`which zenity`
  337. if [ "" != "${ISKDE}" -a "" != "${KDIALOG}" -a "" != "${DISPLAY}" ]; then
  338. echo "Dialog on Display: ${DISPLAY}"
  339. ${KDIALOG} --title "DMDirc: ${1}" --error "${1}\n\n${2}"
  340. elif [ "" != "${ISGNOME}" -a "" != "${ZENITY}" -a "" != "${DISPLAY}" ]; then
  341. echo "Dialog on Display: ${DISPLAY}"
  342. ${ZENITY} --error --title "DMDirc: ${1}" --text "${1}\n\n${2}"
  343. fi
  344. }
  345. # Location of .run stub end
  346. ENDLINE=`grep -na "^###END INCLUDE###$" $0`
  347. ENDLINE=$((${ENDLINE%%:*} + 1))
  348. if [ "" = "${ENDLINE}" ]; then
  349. errordialog "DMDirc Setup" "End of stub not found. Aborting.";
  350. exit 0;
  351. fi
  352. # Attempt to get a name for a random dir in /tmp
  353. random() {
  354. # First off, lets try mktemp.
  355. MKTEMP=`which mktemp`
  356. if [ "" != "${MKTEMP}" ]; then
  357. # mktemp exists \o
  358. DIR=`${MKTEMP} -d`
  359. eval "$1=${DIR}"
  360. return;
  361. fi
  362. TMPDIR=${TMPDIR:=/tmp}
  363. BASEDIR=${TMPDIR}dmdirc_`whoami`_
  364. DIR=${PWD}
  365. while [ -d "${DIR}" ]; do
  366. if [ "" != "${RANDOM}" ]; then
  367. # Bash has a psuedo random number generator that can be accessed
  368. # using ${RANDOM}
  369. RND=${RANDOM}${RANDOM}${RANDOM}
  370. else
  371. # Dash (the ubuntu default sh) however does not.
  372. # od and awk however usually exist, and we can get a random number
  373. # from /dev/urandom or /dev/random
  374. OD=`which od`
  375. AWK=`which awk`
  376. RND=""
  377. if [ "" != "$OD" -a "" != "$AWK" ]; then
  378. # Try /dev/urandom first
  379. RAND=/dev/urandom
  380. # If it doesn't exist try /dev/random
  381. if [ ! -e "${RAND}" ]; then
  382. RAND=/dev/urandom;
  383. fi
  384. # This makes sure we only try to read if one exists
  385. if [ ! -e "${RAND}" ]; then
  386. RND=$(head -1 ${RAND} | od -N 3 -t u | awk '{ print $2 }')
  387. fi;
  388. fi;
  389. # No random number was generated, getting to here means that
  390. # ${RANDOM} doesn't exist, /dev/random doesn't exist, /dev/urandom doesn't exist
  391. # or that od/awk don't exist. Annoying.
  392. # Try using this processes PID instead!
  393. if [ "${RND}" = "" ]; then
  394. RND=$$
  395. DIR=${BASEDIR}${RND}
  396. if [ -e "${DIR}" ]; then
  397. # Lets hope this never happens.
  398. errordialog "DMDirc Setup" "Unable to create random directory";
  399. exit 0;
  400. fi;
  401. fi;
  402. fi;
  403. DIR=${BASEDIR}${RND}
  404. done
  405. mkdir ${DIR}
  406. eval "$1=${DIR}"
  407. }
  408. uncompress() {
  409. tail -n +${ENDLINE} "${OLDPWD}/$0" | gzip -cd | tar -xvf - 2>/dev/null || {
  410. echo "Decompression failed."
  411. kill -15 $$;
  412. };
  413. }
  414. showHelp() {
  415. echo "This will install DMDirc on a unix based system."
  416. echo "The following command line arguments are known:"
  417. echo "---------------------"
  418. echo "-h, --help Help information"
  419. echo "-e, --extract Extract .run file only, do not run setup.sh"
  420. echo "-s, --script Don't use installer.jar (not implemented yet)"
  421. echo "---------------------"
  422. exit 0;
  423. }
  424. # Defaults
  425. extractOnly="false"
  426. setupParams=""
  427. skipMD5="false"
  428. # Begin
  429. echo "---------------------"
  430. echo "DMDirc Unix Setup"
  431. if [ "${isRelease}" != "" ]; then
  432. echo "Version: "${isRelease};
  433. setupParams="${setupParams} --release "${isRelease}
  434. fi;
  435. echo "---------------------"
  436. # Check for cmdline args
  437. while test -n "$1"; do
  438. case "$1" in
  439. --help|-h)
  440. showHelp
  441. ;;
  442. --extract|-e)
  443. extractOnly="true"
  444. ;;
  445. --script|-s)
  446. setupParams="${setupParams} --script"
  447. ;;
  448. --nomd5)
  449. skipMD5="true"
  450. ;;
  451. esac
  452. shift
  453. done
  454. MD5BIN=`which md5sum`
  455. AWK=`which awk`
  456. getMD5() {
  457. # Everything below the MD5SUM Line
  458. MD5LINE=`grep -na "^MD5=\".*\"$" ${1}`
  459. MD5LINE=$((${MD5LINE%%:*} + 1))
  460. MD5SUM=`tail -n +${MD5LINE} "${1}" | ${MD5BIN} - | ${AWK} '{print $1}'`
  461. return;
  462. }
  463. if [ "${MD5BIN}" != "" ]; then
  464. if [ ${skipMD5} != "true" ]; then
  465. #if [ -e "${0}.md5" ]; then
  466. # echo "Checking MD5 using ${0}.md5.."
  467. # ${MD5BIN} --check --status ${0}.md5
  468. # if [ $? = 0 ]; then
  469. # echo "MD5 Check Passed!"
  470. # else
  471. # ERROR="This copy of the DMDirc installer appears to be damaged and will now exit.";
  472. # ERROR=${ERROR}"\nYou may choose to skip this check and run it anyway by passing the --nomd5 parameter";
  473. # errordialog "DMDirc Setup: MD5 Check Failed!" "${ERROR}";
  474. # exit 1;
  475. # fi
  476. #elif [ "${MD5}" != "" ]; then
  477. if [ "${MD5}" != "" ]; then
  478. echo "Checking MD5 using built in hash.."
  479. if [ "${AWK}" != "" ]; then
  480. MD5SUM=""
  481. getMD5 ${0} ${MD5SUM}
  482. echo "SUM obtained is: ${MD5SUM}"
  483. echo "SUM expected is: ${MD5}"
  484. if [ "${MD5SUM}" = "${MD5}" ]; then
  485. echo "MD5 Check Passed!"
  486. else
  487. ERROR="This copy of the DMDirc installer appears to be damaged and will now exit.";
  488. ERROR=${ERROR}"\nYou may choose to skip this check and run it anyway by passing the --nomd5 parameter";
  489. errordialog "DMDirc Setup: MD5 Check Failed!" "${ERROR}";
  490. exit 1;
  491. fi;
  492. else
  493. echo "MD5 Check skipped (awk not found).."
  494. fi;
  495. else
  496. #if [ "${MD5BIN}" = "" ]; then
  497. # echo "MD5 Check skipped (md5sum not found).."
  498. #else
  499. echo "MD5 Check skipped (No MD5 hash found to compare against).."
  500. #fi
  501. fi;
  502. else
  503. echo "MD5 Check skipped (Requested).."
  504. fi
  505. fi;
  506. OLDPWD=${PWD}
  507. echo "Getting Temp Dir"
  508. random TEMPDIR
  509. echo "Got Temp Dir: ${TEMPDIR}"
  510. cd ${TEMPDIR}
  511. echo "Uncompressing to temp dir.."
  512. uncompress
  513. echo "Done."
  514. # Check if extract only was wanted.
  515. if [ "${extractOnly}" = "true" ]; then
  516. echo "Extracted. (Files can be found in: ${TEMPDIR})"
  517. exit 0;
  518. fi
  519. if [ -e "${TEMPDIR}/setup.sh" ]; then
  520. echo "Running setup.."
  521. chmod a+x ${TEMPDIR}/setup.sh
  522. ${TEMPDIR}/setup.sh ${setupParams}
  523. echo ""
  524. if [ $? -eq 0 ]; then
  525. echo "Setup completed."
  526. else
  527. echo "Setup failed."
  528. fi
  529. else
  530. echo "No setup.sh found. This was pointless?"
  531. fi
  532. echo "Removing temp dir"
  533. cd ${OLDPWD}
  534. rm -Rf ${TEMPDIR}
  535. echo "Installation Completed."
  536. # Job Done!
  537. exit 0;
  538. ###END INCLUDE###