home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 4 Drivers / 04-Drivers.zip / 2300eide.zip / PTIINST < prev    next >
Text File  |  1994-11-14  |  2KB  |  114 lines

  1.  
  2. DRV=$1
  3. while [ 1 ]
  4. do
  5. if [ "$DRV" != "A:"  -a "$DRV" != "a:" -a "$DRV" != "B:" -a "$DRV" != "b:" ]
  6. then
  7. echo "Incorrect drive name ! (choose a: or b:) \c"
  8. read $DRV 
  9. else
  10. break
  11. fi
  12. done
  13.  
  14. CURRDIR=`pwd` 
  15. TMPDIR=/tmp/$$
  16. rm -r $TMPDIR > /dev/null 2>&1
  17. mkdir $TMPDIR
  18. cd $TMPDIR
  19. PTIOS=SCO
  20. strings - /bin/pwd | grep 'SCO' > /dev/null 2>&1
  21. echo "Copy files from floppy ..."
  22. if [ $? = 0 ]
  23. then
  24. echo ".\c"
  25. doscp -r $DRV/unix/Driver.sco .
  26. echo ".\c"
  27. doscp -r $DRV/unix/Driver.att .
  28. echo ".\c"
  29. doscp -r $DRV/unix/Install  .
  30. echo ".\c"
  31. doscp -r $DRV/unix/Remove  .
  32. echo ".\c"
  33. doscp -r $DRV/unix/Name  .
  34. echo ".\c"
  35. doscp -r $DRV/unix/Size  .
  36. echo ".\c"
  37. doscp -r $DRV/unix/ptisetmode .
  38. else
  39. PTIOS=ATT
  40. echo ".\c"
  41. doscp -m $DRV/unix/Driver.sco .
  42. echo ".\c"
  43. doscp -m $DRV/unix/Driver.att .
  44. echo ".\c"
  45. doscp -m $DRV/unix/Install  .
  46. echo ".\c"
  47. doscp -m $DRV/unix/Remove  .
  48. echo ".\c"
  49. doscp -m $DRV/unix/Name  .
  50. echo ".\c"
  51. doscp -m $DRV/unix/Size  .
  52. echo ".\c"
  53. doscp -m $DRV/unix/ptisetmode .
  54. fi
  55.  
  56. echo "\n\nPlease remove this floppy from drive."
  57. echo "\nNow, another floppy is needed for temporary use, and"
  58. echo "the contents of this temporary floppy will be destoryed."
  59. echo "Do you wish to continue?(y/n) \c"
  60. read AAA
  61. if [ "$AAA" = "N" -o "$AAA" = "n" ]
  62. then
  63.     exit 1
  64. fi
  65.  
  66. echo "\n"
  67. while [ 1 ]
  68. do
  69. echo "In which drive is the temporary floppy inserted ?"
  70. echo "    1) 1.44 MB 3 1/2\" drive A:"
  71. echo "    2) 1.44 MB 3 1/2\" drive B:"
  72. echo "    3) 1.2 MB 5 1/4\" drive A:"
  73. echo "    4) 1.2 MB 5 1/4\" drive B:"
  74. echo "Please choose it (1, 2, 3, 4): \c"
  75. read AAA
  76. if [ "$AAA" = "1" -o "$AAA" = "2" -o "$AAA" = "3" -o "$AAA" = "4" ]
  77. then
  78. break
  79. fi
  80. done
  81.  
  82. echo "\n"
  83. if [ "$AAA" = "1" ]
  84. then
  85. DRV=/dev/rdsk/f0q18d
  86. fi
  87. if [ "$AAA" = "2" ]
  88. then
  89. DRV=/dev/rdsk/f1q18d
  90. fi
  91. if [ "$AAA" = "3" ]
  92. then
  93. DRV=/dev/rdsk/f0q15d
  94. fi
  95. if [ "$AAA" = "4" ]
  96. then
  97. DRV=/dev/rdsk/f1q15d
  98. fi
  99.  
  100. format $DRV
  101.  
  102. if [ $PTIOS = SCO ]
  103. then
  104. ls * | cpio -oBcdmu > $DRV 
  105. else
  106. ls * | cpio -oBmu -H odc > $DRV 
  107. fi
  108. echo "\n Please keep this floppy in drive until the installation is complete."
  109. echo "Press <Enter> to continue \c"
  110. read AAA
  111. installpkg
  112. cd $CURRDIR
  113. rm -r $TMPDIR
  114.