new2dir 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. #!/bin/sh
  2. #(c) Copyright Barry Kauler 2007
  3. #Now LGPL 2007
  4. #run like this: # new2dir make install
  5. #creates a directory one or two levels higher with the name of the package
  6. #but slightly modified. For example source package has dir 'abiword-0.5.6'
  7. #inside this you do the usual 'configure', 'make', then 'new2dir make install'
  8. #and 'abiword-0.5.6-i486' directory gets created, with all installed files
  9. #in it.
  10. #120220 jemimah: fix to work with cmake (uncertain if will break anything else). ref: http://murga-linux.com/puppy/viewtopic.php?t=71767&start=420
  11. #120602 updated installwatch to 0.7, got double hits from /tmp/pkginstall.list.
  12. #130121 grab a .pot if it exists.
  13. #131121 add support for different arches
  14. #141011 unattended, for build scripts
  15. usage() {
  16. echo
  17. echo "This script is used in the last step when installing a source"
  18. echo "or binary package. For example:"
  19. echo "# new2dir make install"
  20. echo
  21. echo "For an automated script call with 'newer2dir', for example"
  22. echo "newer2dir make install"
  23. echo "Exiting script."
  24. }
  25. if [ ${@} != "make install" ];then
  26. usage
  27. exit
  28. fi
  29. auto=0 #0, manual, 1 , auto
  30. echo $0|grep -q 'newer' && auto=1
  31. TIMEOUT='-t 1'
  32. ARCH=`uname -m`
  33. if [ ! "$CPUTYPE" ];then
  34. if [ -f config.log ];then
  35. BuildCPU=`grep -m1 '^build_cpu='.*'' config.log |cut -f 2 -d "'"`
  36. HostCPU=`grep -m1 '^host_cpu='.*'' config.log |cut -f 2 -d "'"`
  37. if [ "$HostCPU" != "$BuildCPU" ];then
  38. echo "WARNING build_cpu='$BuildCPU' NOT host_cpu='$HostCPU'"
  39. fi
  40. CPUTYPE="$BuildCPU"
  41. fi
  42. if [ ! "$CPUTYPE" ];then
  43. if [ ! "$TIMEOUT" ];then
  44. CPUTYPE="i486"
  45. else
  46. CPUTYPE="$ARCH"
  47. fi
  48. else
  49. echo "Found '$CPUTYPE'"
  50. fi
  51. fi
  52. CPU="$CPUTYPE"
  53. CURRDIR="`pwd`"
  54. UPONE="`dirname "$CURRDIR"`"
  55. PKGDIR="../`basename "$CURRDIR"`"
  56. xPKGDIR="`basename "$CURRDIR"`"
  57. if [ "`echo "$PKGDIR" | grep '[0-9]'`" = "" ];then
  58. PKGDIR="../../`basename "$UPONE"`"
  59. xPKGDIR="`basename "$UPONE"`"
  60. fi
  61. if [ "`echo "$PKGDIR" | grep '[0-9]'`" = "" ];then
  62. echo "$PKGDIR does not seem to be the package directory with version"
  63. echo "number. Unfortunately, some source package tarballs expand to a"
  64. echo "directory that does not have version number in it's name. SeaMonkey"
  65. echo "is an example of this, it expands to a directory named just 'mozilla'."
  66. echo "This script will create a package with the same name as the directory"
  67. echo "and it absolutely must have the version number in it which must commence"
  68. echo "with a numeric digit. So, you must now close this rxvt terminal window"
  69. echo "then rename the directory. For example, for SeaMonkey version 1.0.7"
  70. echo "rename the directory from 'mozilla' to 'seamonkey-1.0.7'"
  71. echo "A dash '-' must be used to separate the package name from version."
  72. echo "A directory name like 'seamonkey-alpha1' is NOT allowed as the version"
  73. echo "number must start with a numeric digit, example 'seamonkey-1.0.7alpha1'."
  74. echo "Exiting script."
  75. exit
  76. fi
  77. fixfilelistfunc() {
  78. #$1 is file to remove, as doesn't exist.
  79. echo " ...${1} has been deleted."
  80. grep -v "$1" /tmp/${EXE_PKGNAME}.files > /tmp/${EXE_PKGNAME}.files.tmp
  81. mv -f /tmp/${EXE_PKGNAME}.files.tmp /tmp/${EXE_PKGNAME}.files
  82. }
  83. if [ "$auto" -eq 0 ];then
  84. echo
  85. echo -en "\\033[1;31mStep 1" #red
  86. echo -e "\\033[0;39m"
  87. echo "It seems that the package directory is '$PKGDIR'"
  88. echo "If this is correct, just press ENTER key."
  89. echo "Otherwise, type the correct directory with relative address."
  90. echo " NOTE:"
  91. echo " This script will create a package with the same name as the directory"
  92. echo " and it absolutely must have the version number in it which must commence"
  93. echo " with a numeric digit, and name and version number must be separated by"
  94. echo " a dash '-', for example, 'seamonkey-1.0.7'."
  95. echo " A directory name like 'seamonkey-alpha1' is NOT allowed as the version"
  96. echo " number must start with a numeric digit, example 'seamonkey-1.0.7alpha1'."
  97. echo " If $PKGDIR is incorrect you must now exit with CTRL-C and close this"
  98. echo " rxvt terminal window then rename the directory."
  99. echo -n "Type response now: "
  100. read REPLY1
  101. [ ! "$REPLY1" = "" ] && PKGDIR="$REPLY1"
  102. if [ ! -d "$PKGDIR" ];then
  103. echo
  104. echo "$PKGDIR does not exist, exiting script."
  105. exit
  106. fi
  107. echo "Okay, using $PKGDIR"
  108. echo
  109. echo -en "\\033[1;31mStep 2" #red
  110. echo -e "\\033[0;39m"
  111. echo "This Puppy is designed to run on a $ARCH. Normally this means"
  112. echo "that you have to specify 'build=$CPUTYPE-linux-gnu' (sometimes host=)"
  113. echo "Some packages do not have that configure option and compile for a"
  114. echo "specific CPU regardless what is in your PC."
  115. echo "If you have compiled for a $CPUTYPE, just press ENTER key."
  116. echo "Otherwise, enter the CPU type, examples: i386 i486 i686 amd64 x86_64 armv6"
  117. echo "(the i is required)."
  118. echo "If this is a script only with NO binarys type \"noarch\"."
  119. echo -n "Type response here: "
  120. read CPUTYPE
  121. [ "$CPUTYPE" = "" ] && CPUTYPE="$CPU"
  122. if [ "`echo -n "$CPUTYPE" | grep '^[a-zA-Z]'`" = "" ];then
  123. echo "$CPUTYPE is not valid. Exiting."
  124. exit
  125. fi
  126. echo "Okay, using $CPUTYPE"
  127. fi
  128. #would like to create different targets for exe, doc, dev, nls components...
  129. EXE_TARGETDIR="${PKGDIR}-${CPUTYPE}" #relative path.
  130. EXE_PKGNAME="`basename $EXE_TARGETDIR`"
  131. RELPATH="`dirname $EXE_TARGETDIR`"
  132. #difficult task, separate package name from version part...
  133. #not perfect, some start with non-numeric version info...
  134. xNAMEONLY="`echo -n "$xPKGDIR" | sed -e 's/\-[0-9].*$//g'`"
  135. #...if that fails, do it the old way...
  136. [ "$xNAMEONLY" = "$xPKGDIR" ] && xNAMEONLY="`echo "$xPKGDIR" | cut -f 1 -d "-"`"
  137. NAMEONLY="${RELPATH}/${xNAMEONLY}"
  138. #abasename="`basename ${PKGDIR}`"
  139. apattern="s/${xNAMEONLY}\\-//g"
  140. VERONLY="`echo -n "$xPKGDIR" | sed -e "$apattern"`"
  141. DOC_TARGETDIR="${NAMEONLY}_DOC-${VERONLY}-${CPUTYPE}"
  142. DOC_PKGNAME="`basename $DOC_TARGETDIR`"
  143. DEV_TARGETDIR="${NAMEONLY}_DEV-${VERONLY}-${CPUTYPE}"
  144. DEV_PKGNAME="`basename $DEV_TARGETDIR`"
  145. NLS_TARGETDIR="${NAMEONLY}_NLS-${VERONLY}-${CPUTYPE}"
  146. NLS_PKGNAME="`basename $NLS_TARGETDIR`"
  147. rm -rf "$EXE_TARGETDIR" 2>/dev/null
  148. rm -rf "$DOC_TARGETDIR" 2>/dev/null
  149. rm -rf "$DEV_TARGETDIR" 2>/dev/null
  150. rm -rf "$NLS_TARGETDIR" 2>/dev/null
  151. if [ "$auto" -eq 0 ];then
  152. echo
  153. echo -en "\\033[1;31mStep 3" #red
  154. echo -e "\\033[0;39m"
  155. echo "If you wish, you can split the final package up into separate"
  156. echo "packages for the 'executables', 'documentation', 'development' and"
  157. echo "'international' components."
  158. echo "If the package has shared libraries, it is recommended to at least"
  159. echo "create a seaparate 'development' package."
  160. echo "The idea here is to 'trim the fat' as much as possible so that you only"
  161. echo "have what is absolutely needed in the 'executables' PET package, but"
  162. echo "the extra components can be installed if needed."
  163. echo -en "\\033[1;31mWARNING: "
  164. echo -en "\\033[0;39m"
  165. echo "The automatic splitting performed by this script may not be"
  166. echo " perfect and you may have to modify the contents of the created"
  167. echo " separate directories before the final step of converting them"
  168. echo " to PET packages."
  169. echo
  170. echo "Just press ENTER key only to create one package only."
  171. echo "Or, type a number to choose which separate packages to create:"
  172. echo " 1 Just one package (directory) only"
  173. echo " 2 Create a separate 'development' package"
  174. echo " 3 Create separate 'development', 'documentation', 'international' pkgs"
  175. echo "Or, type a comma-separated list of the separate pkgs that you want to"
  176. echo " create, using keywords 'exe', 'dev', 'doc', 'nls'."
  177. echo " Example: exe,dev,doc (in this example, nls component is left in the"
  178. echo " main package, that is, the exe component)."
  179. echo -n "Type response (just press ENTER if in doubt): "
  180. read SPLITPETS
  181. [ "$SPLITPETS" = "" ] && SPLITPETS="exe"
  182. [ "$SPLITPETS" = "1" ] && SPLITPETS="exe"
  183. [ "$SPLITPETS" = "2" ] && SPLITPETS="exe,dev"
  184. [ "$SPLITPETS" = "3" ] && SPLITPETS="exe,dev,doc,nls"
  185. EXESPLIT="";DOCSPLIT="";DEVSPLIT="";NLSSPLIT=""
  186. [ ! "`echo "$SPLITPETS" | grep 'exe'`" = "" ] && EXESPLIT="yes"
  187. [ ! "`echo "$SPLITPETS" | grep 'doc'`" = "" ] && DOCSPLIT="yes"
  188. [ ! "`echo "$SPLITPETS" | grep 'dev'`" = "" ] && DEVSPLIT="yes"
  189. [ ! "`echo "$SPLITPETS" | grep 'nls'`" = "" ] && NLSSPLIT="yes"
  190. [ ! "`echo "$SPLITPETS" | grep 'exe'`" = "" ] && mkdir "$EXE_TARGETDIR"
  191. else
  192. EXESPLIT="";DOCSPLIT="";DEVSPLIT="";NLSSPLIT=""
  193. mkdir "$EXE_TARGETDIR"
  194. EXESPLIT="yes"
  195. DOCSPLIT="yes"
  196. DEVSPLIT="yes"
  197. NLSSPLIT="yes"
  198. SPLITPETS="exe,dev,doc,nls"
  199. fi
  200. if [ "$auto" = 0 ];then
  201. echo
  202. echo -en "\\033[1;31mStep 4" #red
  203. echo -e "\\033[0;39m"
  204. echo "The following line is about to be executed:"
  205. echo "# installwatch -o /tmp/pkginstall.list ${@}"
  206. echo "...this logs all file activity to /tmp/pkginstall.list"
  207. echo "This script will then determine all newly created directories"
  208. echo "and files and create '$EXE_TARGETDIR' with the new files."
  209. echo "(and optionally ${DEV_TARGETDIR}, ${DOC_TARGETDIR}, ${NLS_TARGETDIR})"
  210. echo -n "Press ENTER key to continue: "
  211. read goforit
  212. installwatch -o /tmp/pkginstall.list ${@}
  213. else
  214. installwatch -o /tmp/pkginstall.list ${@}
  215. fi
  216. sync
  217. #create list of installed files...
  218. cat /tmp/pkginstall.list | grep '#success$' | tr -s '\t' | tr '&' ' ' | tr '\t' '&' | egrep '^[345]&open&|^0&chmod&' | grep --extended-regexp -v '&/dev/tty&|&/dev/null&|&/root/\.packages/|&/tmp/|&/root/\.icewm/|&/proc/|&/sys/|DotPupTmpDir|/\.myownmenuerc' | grep -E -v '&/initrd|&/mnt/' | cut -f 3 -d '&' | sort -u > ${RELPATH}/${EXE_PKGNAME}.files #120220 120602
  219. #...list will only have created files, not created directories, so an empty
  220. # directory won't get recorded.
  221. #bad if we miss out installing an empty directory...
  222. cat /tmp/pkginstall.list | grep '#success$' | tr -s '\t' | tr '&' ' ' | tr '\t' '&' | grep '^0&mkdir&' | grep --extended-regexp -v '&/dev/tty&|&/dev/null&|&/root/\.packages/|&/tmp/|&/root/\.icewm/|&/proc/|&/sys/|DotPupTmpDir|/\.myownmenuerc' | grep -E -v '&/initrd|&/mnt/' | cut -f 3 -d '&' | sed -e 's/^\/\//\//g' > /tmp/${EXE_PKGNAME}.dirs
  223. sync
  224. #pick up created symlinks...
  225. cat /tmp/pkginstall.list | grep '#success$' | tr -s '\t' | tr '&' ' ' | tr '\t' '&' | grep '^0&symlink&' | grep --extended-regexp -v '&/dev/tty&|&/dev/null&|&/root/\.packages/|&/tmp/|&/root/\.icewm/|&/proc/|&/sys/|DotPupTmpDir|/\.myownmenuerc' | grep -E -v '&/initrd|&/mnt/' | cut -f 4 -d '&' >> ${RELPATH}/${EXE_PKGNAME}.files
  226. sync
  227. #problem if there is a post-install script that moves or renames a file...
  228. cat /tmp/pkginstall.list | grep '#success$' | tr -s '\t' | tr '&' ' ' | tr '\t' '&' | grep '^0&rename&' | grep --extended-regexp -v '&/dev/tty&|&/dev/null&|&/root/\.packages/|&/tmp/|&/root/\.icewm/|&/proc/|&/sys/|DotPupTmpDir|/\.myownmenuerc' | grep -E -v '&/initrd|&/mnt/' | cut -f 3,4 -d '&' | tr '\n' ' ' > /tmp/${EXE_PKGNAME}.moved.files
  229. #find out if any installed file got moved/renamed...
  230. if [ -s /tmp/${EXE_PKGNAME}.moved.files ];then
  231. for ONEMOVED in `cat /tmp/${EXE_PKGNAME}.moved.files`
  232. do
  233. ONEORIG="`echo -n "$ONEMOVED" | cut -f 1 -d '&'`"
  234. ONENEW="`echo -n "$ONEMOVED" | cut -f 2 -d '&'`"
  235. grep -v "$ONEORIG" ${RELPATH}/${EXE_PKGNAME}.files > /tmp/${EXE_PKGNAME}.files
  236. echo "$ONENEW" >> /tmp/${EXE_PKGNAME}.files
  237. sync
  238. mv -f /tmp/${EXE_PKGNAME}.files ${RELPATH}/${EXE_PKGNAME}.files
  239. done
  240. fi
  241. sync
  242. echo
  243. echo -en "\\033[1;31mStep 5" #red
  244. echo -e "\\033[0;39m"
  245. #fixfilelistfunc() uses this...
  246. cp -af ${RELPATH}/${EXE_PKGNAME}.files /tmp/${EXE_PKGNAME}.files
  247. #...a post-install script could delete files, which fixfilelistfunc fixes.
  248. cat ${RELPATH}/${EXE_PKGNAME}.files |
  249. while read ONEFILE
  250. do
  251. ONEBASE="`basename "$ONEFILE"`"
  252. ONEPATH="`dirname "$ONEFILE"`"
  253. echo "Processing ${ONEFILE}"
  254. #strip the file...
  255. if [ ! -h "$ONEFILE" ];then #make sure it isn't a symlink
  256. [ ! "`file "$ONEFILE" | grep 'ELF' | grep 'shared object'`" = "" ] && strip --strip-debug "$ONEFILE"
  257. [ ! "`file "$ONEFILE" | grep 'ELF' | grep 'executable'`" = "" ] && strip --strip-unneeded "$ONEFILE"
  258. fi
  259. sync
  260. if [ "$NLSSPLIT" = "yes" ];then
  261. #find out if this is an international language file...
  262. if [ ! "`echo -n "$ONEFILE" | grep --extended-regexp '/locale/|/nls/|/i18n/'`" = "" ];then
  263. mkdir -p "${NLS_TARGETDIR}/${ONEPATH}"
  264. cp -af "$ONEFILE" "${NLS_TARGETDIR}/${ONEPATH}/" 2>/dev/null
  265. [ $? -ne 0 ] && fixfilelistfunc "$ONEFILE"
  266. continue
  267. fi
  268. fi
  269. if [ "$DOCSPLIT" = "yes" ];then
  270. #find out if this is a documentation file...
  271. if [ ! "`echo -n "$ONEFILE" | grep --extended-regexp '/man/|/doc/|/docs/|/info/|/gtk-doc/|/faq/|/manual/|/examples/|/help/|/htdocs/'`" = "" ];then
  272. mkdir -p "${DOC_TARGETDIR}/${ONEPATH}"
  273. cp -af "$ONEFILE" "${DOC_TARGETDIR}/${ONEPATH}/" 2>/dev/null
  274. [ $? -ne 0 ] && fixfilelistfunc "$ONEFILE"
  275. continue
  276. fi
  277. fi
  278. if [ "$DEVSPLIT" = "yes" ];then
  279. #find out if this is development file...
  280. if [ ! "`echo -n "$ONEFILE" | grep --extended-regexp '/include/|/pkgconfig/|/aclocal|/cvs/|/svn/'`" = "" ];then
  281. mkdir -p "${DEV_TARGETDIR}/${ONEPATH}"
  282. cp -af "$ONEFILE" "${DEV_TARGETDIR}/${ONEPATH}/" 2>/dev/null
  283. [ $? -ne 0 ] && fixfilelistfunc "$ONEFILE"
  284. continue
  285. fi
  286. #find *.so symlink files...
  287. #if [ -h "$ONEFILE" ];then #-h tests for symlink
  288. #if [ ! "`echo -n "$ONEFILE" | grep '\.so$'`" = "" ];then
  289. #mkdir -p "${DEV_TARGETDIR}/${ONEPATH}"
  290. #cp -af "$ONEFILE" "${DEV_TARGETDIR}/${ONEPATH}/" 2>/dev/null
  291. #[ $? -ne 0 ] && fixfilelistfunc "$ONEFILE"
  292. #continue
  293. #fi
  294. #fi
  295. #find various config files...
  296. if [ ! "`echo -n "$ONEBASE" | grep --extended-regexp '\-config$|config.sh$|Conf.sh$'`" = "" ];then
  297. mkdir -p "${DEV_TARGETDIR}/${ONEPATH}"
  298. cp -af "$ONEFILE" "${DEV_TARGETDIR}/${ONEPATH}/" 2>/dev/null
  299. [ $? -ne 0 ] && fixfilelistfunc "$ONEFILE"
  300. continue
  301. fi
  302. #all .a and .la files... and any stray .m4 files...
  303. if [ ! "`echo -n "$ONEBASE" | grep --extended-regexp '\.a$|\.la$|\.m4$'`" = "" ];then
  304. mkdir -p "${DEV_TARGETDIR}/${ONEPATH}"
  305. cp -af "$ONEFILE" "${DEV_TARGETDIR}/${ONEPATH}/" 2>/dev/null
  306. [ $? -ne 0 ] && fixfilelistfunc "$ONEFILE"
  307. continue
  308. fi
  309. fi
  310. #anything left over goes into the main 'executable' package...
  311. if [ "$EXESPLIT" = "yes" ];then
  312. mkdir -p "${EXE_TARGETDIR}/${ONEPATH}"
  313. cp -af "$ONEFILE" "${EXE_TARGETDIR}/${ONEPATH}/" 2>/dev/null
  314. [ $? -ne 0 ] && fixfilelistfunc "$ONEFILE"
  315. #fix for empty directories...
  316. cat /tmp/${EXE_PKGNAME}.dirs |
  317. while read ANEWDIR
  318. do
  319. [ "`ls -1 $ANEWDIR`" = "" ] && mkdir -p ${EXE_TARGETDIR}${ANEWDIR}
  320. done
  321. fi
  322. done
  323. #130121 grab a .pot if it exists...
  324. sync
  325. pnPTN="/${xNAMEONLY}.pot"
  326. if [ "`grep "$pnPTN" /tmp/${EXE_PKGNAME}.files`" = "" ];then
  327. FNDPOT="$(find ${CURRDIR}/ -type f -name "${xNAMEONLY}.pot" | head -n 1)"
  328. if [ "$FNDPOT" ];then
  329. mkdir -p ${EXE_TARGETDIR}/usr/share/doc/nls/${xNAMEONLY}
  330. cp -f "$FNDPOT" ${EXE_TARGETDIR}/usr/share/doc/nls/${xNAMEONLY}/
  331. echo "/usr/share/doc/nls/${xNAMEONLY}/" >> /tmp/${EXE_PKGNAME}.files
  332. echo "/usr/share/doc/nls/${xNAMEONLY}/${xNAMEONLY}.pot" >> /tmp/${EXE_PKGNAME}.files
  333. fi
  334. fi
  335. sync
  336. cp -af /tmp/${EXE_PKGNAME}.files ${RELPATH}/${EXE_PKGNAME}.files
  337. if [ "$auto" -ne 0 ];then
  338. echo "all done"
  339. exit
  340. fi
  341. echo
  342. echo -en "\\033[1;31mFinished" #red
  343. echo -e "\\033[0;39m"
  344. echo "$EXE_TARGETDIR is now fully populated."
  345. [ -d "$DEV_TARGETDIR" ] && echo "$DEV_TARGETDIR has also been populated."
  346. [ -d "$DOC_TARGETDIR" ] && echo "$DOC_TARGETDIR has also been populated."
  347. [ -d "$NLS_TARGETDIR" ] && echo "$NLS_TARGETDIR has also been populated."
  348. echo "${RELPATH}/${EXE_PKGNAME}.files has a list of the installed files."
  349. echo "You might want to go into it and trim the fat or whatever,"
  350. echo "but basically it is now ready to be converted to a PET"
  351. echo "package. Just do this:"
  352. echo "# cd ${RELPATH}"
  353. echo "# dir2pet $EXE_PKGNAME"
  354. echo
  355. echo "Press ENTER only to exit this script."
  356. echo "Or, if you want the convenience, the 'dir2pet' script can be launched"
  357. echo "right now -- press any character on the keyboard then ENTER."
  358. echo -n "Type response here: "
  359. read nextphase
  360. [ "$nextphase" = "" ] && exit
  361. cd ${RELPATH}
  362. if [ -d ${xNAMEONLY}-${VERONLY}-${CPUTYPE} ];then
  363. dir2pet ${xNAMEONLY}-${VERONLY}-${CPUTYPE}
  364. echo -n "${xNAMEONLY}-${VERONLY}-${CPUTYPE}.pet created. Press ENTER to continue: "
  365. read domore
  366. fi
  367. if [ -d ${xNAMEONLY}_DEV-${VERONLY}-${CPUTYPE} ];then
  368. dir2pet ${xNAMEONLY}_DEV-${VERONLY}-${CPUTYPE}
  369. echo -n "${xNAMEONLY}_DEV-${VERONLY}-${CPUTYPE}.pet created. Press ENTER to continue: "
  370. read domore
  371. fi
  372. if [ -d ${xNAMEONLY}_DOC-${VERONLY}-${CPUTYPE} ];then
  373. dir2pet ${xNAMEONLY}_DOC-${VERONLY}-${CPUTYPE}
  374. echo -n "${xNAMEONLY}_DOC-${VERONLY}-${CPUTYPE}.pet created. Press ENTER to continue: "
  375. read domore
  376. fi
  377. if [ -d ${xNAMEONLY}_NLS-${VERONLY}-${CPUTYPE} ];then
  378. dir2pet ${xNAMEONLY}_NLS-${VERONLY}-${CPUTYPE}
  379. echo -n "${xNAMEONLY}_NLS-${VERONLY}-${CPUTYPE}.pet created. Press ENTER to continue: "
  380. read domore
  381. fi
  382. echo "All done."
  383. ###END###