[PC-BSD Commits] r337 - in pcbsd/trunk/system-overlay/PCBSD/Components: . kdeedu kdegames kdeoffice kdesdk kdetoys

svn at pcbsd.org svn at pcbsd.org
Mon Jun 18 12:57:44 PDT 2007


Author: kris
Date: 2007-06-18 20:57:44 +0100 (Mon, 18 Jun 2007)
New Revision: 337

Added:
   pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/
   pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/component.cfg
   pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/component.png
   pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/install-check.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/install.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/remove.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/
   pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/component.cfg
   pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/component.png
   pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/install-check.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/install.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/remove.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/
   pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/component.cfg
   pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/component.png
   pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/install-check.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/install.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/remove.sh
Modified:
   pcbsd/trunk/system-overlay/PCBSD/Components/kdeedu/component.cfg
   pcbsd/trunk/system-overlay/PCBSD/Components/kdeedu/install.sh
   pcbsd/trunk/system-overlay/PCBSD/Components/kdegames/install.sh
Log:

Setup the add / remove components to properly ask for CD2 or the file location
and add it now




Modified: pcbsd/trunk/system-overlay/PCBSD/Components/kdeedu/component.cfg
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/Components/kdeedu/component.cfg	2007-06-18 19:28:15 UTC (rev 336)
+++ pcbsd/trunk/system-overlay/PCBSD/Components/kdeedu/component.cfg	2007-06-18 19:57:44 UTC (rev 337)
@@ -1,3 +1,3 @@
 # KDE Games component file
-name: Educational Games 
+name: Educational Games
 description: Educational games for PC-BSD 

Modified: pcbsd/trunk/system-overlay/PCBSD/Components/kdeedu/install.sh
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/Components/kdeedu/install.sh	2007-06-18 19:28:15 UTC (rev 336)
+++ pcbsd/trunk/system-overlay/PCBSD/Components/kdeedu/install.sh	2007-06-18 19:57:44 UTC (rev 337)
@@ -1,10 +1,96 @@
 #!/bin/sh
-# This script installs the KDE Games package
+# This script installs the clicked package
 
-pkg_add -f /PCBSD/Components/kdeedu/kdeedu-*.tbz
+# Set our variables
+#############################################################################
+
+CDMNT="/tmp/pcbsdcdmnt"
+MNTLOC=""
+PACKAGE="kdeedu-*.tbz"
+
+# Start install
+#############################################################################
+
+while
+i=1
+do
+
+# Prompt for CD 2
+kdialog --msgbox "Please insert PC-BSD 1.4 CD2 and click OK when ready"
+
+mkdir ${CDMNT}
+mount_cd9660 /dev/cd0 ${CDMNT} >/dev/null 2>/dev/null
+if [ -e "${CDMNT}/README-PBI.txt" ]
+then
+  MNTLOC="${CDMNT}/components"
+  break
+fi
+umount ${CDMNT}
+
+mount_cd9660 /dev/cd1 ${CDMNT} >/dev/null 2>/dev/null
+if [ -e "${CDMNT}/README-PBI.txt" ]
+then
+  MNTLOC="${CDMNT}/components"
+  break
+fi
+umount ${CDMNT}
+
+mount_cd9660 /dev/acd0 ${CDMNT} >/dev/null 2>/dev/null
+if [ -e "${CDMNT}/README-PBI.txt" ]
+then
+  MNTLOC="${CDMNT}/components"
+  break
+fi
+umount ${CDMNT}
+
+mount_cd9660 /dev/acd1 ${CDMNT} >/dev/null 2>/dev/null
+if [ -e "${CDMNT}/README-PBI.txt" ]
+then
+  MNTLOC="${CDMNT}/components"
+  break
+fi
+umount ${CDMNT}
+
+break
+
+done
+
+# Did we find the CD?
+if [ "${MNTLOC}" = "" ] 
+then
+  # Ask the user if they wish to locate file manually
+  kdialog --yesno "PC-BSD CD #2 could not be found.\n Do you wish to specify the package location manually?"
+  if [ "$?" = "0" ]
+  then
+    LOC=`kdialog --getopenfilename '/home' ${PACKAGE}`
+
+     if [ ! -e "${LOC}" ]
+     then
+        kdialog --error "Error: Package not found!"
+     fi
+
+     pkg_add -f ${LOC}
+     if [ "$?" = "0" ]
+     then
+       exit 0
+     else
+       exit 1
+     fi
+
+  fi
+
+else # End of manual install routine
+
+pkg_add -f ${MNTLOC}/${PACKAGE}
 if [ "$?" = "0" ]
 then
-exit 0
+  cd /
+  umount -f ${CDMNT}
+  exit 0
 else
-exit 1
+  cd /
+  umount -f ${CDMNT}
+  exit 1
 fi
+
+fi # End of CD Install routine

Modified: pcbsd/trunk/system-overlay/PCBSD/Components/kdegames/install.sh
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/Components/kdegames/install.sh	2007-06-18 19:28:15 UTC (rev 336)
+++ pcbsd/trunk/system-overlay/PCBSD/Components/kdegames/install.sh	2007-06-18 19:57:44 UTC (rev 337)
@@ -1,10 +1,96 @@
 #!/bin/sh
-# This script installs the KDE Games package
+# This script installs the clicked package
 
-pkg_add -f /PCBSD/Components/kdegames/kdegames-*.tbz
+# Set our variables
+#############################################################################
+
+CDMNT="/tmp/pcbsdcdmnt"
+MNTLOC=""
+PACKAGE="kdegames-*.tbz"
+
+# Start install
+#############################################################################
+
+while
+i=1
+do
+
+# Prompt for CD 2
+kdialog --msgbox "Please insert PC-BSD 1.4 CD2 and click OK when ready"
+
+mkdir ${CDMNT}
+mount_cd9660 /dev/cd0 ${CDMNT} >/dev/null 2>/dev/null
+if [ -e "${CDMNT}/README-PBI.txt" ]
+then
+  MNTLOC="${CDMNT}/components"
+  break
+fi
+umount ${CDMNT}
+
+mount_cd9660 /dev/cd1 ${CDMNT} >/dev/null 2>/dev/null
+if [ -e "${CDMNT}/README-PBI.txt" ]
+then
+  MNTLOC="${CDMNT}/components"
+  break
+fi
+umount ${CDMNT}
+
+mount_cd9660 /dev/acd0 ${CDMNT} >/dev/null 2>/dev/null
+if [ -e "${CDMNT}/README-PBI.txt" ]
+then
+  MNTLOC="${CDMNT}/components"
+  break
+fi
+umount ${CDMNT}
+
+mount_cd9660 /dev/acd1 ${CDMNT} >/dev/null 2>/dev/null
+if [ -e "${CDMNT}/README-PBI.txt" ]
+then
+  MNTLOC="${CDMNT}/components"
+  break
+fi
+umount ${CDMNT}
+
+break
+
+done
+
+# Did we find the CD?
+if [ "${MNTLOC}" = "" ] 
+then
+  # Ask the user if they wish to locate file manually
+  kdialog --yesno "PC-BSD CD #2 could not be found.\n Do you wish to specify the package location manually?"
+  if [ "$?" = "0" ]
+  then
+    LOC=`kdialog --getopenfilename '/home' ${PACKAGE}`
+
+     if [ ! -e "${LOC}" ]
+     then
+        kdialog --error "Error: Package not found!"
+     fi
+
+     pkg_add -f ${LOC}
+     if [ "$?" = "0" ]
+     then
+       exit 0
+     else
+       exit 1
+     fi
+
+  fi
+
+else # End of manual install routine
+
+pkg_add -f ${MNTLOC}/${PACKAGE}
 if [ "$?" = "0" ]
 then
-exit 0
+  cd /
+  umount -f ${CDMNT}
+  exit 0
 else
-exit 1
+  cd /
+  umount -f ${CDMNT}
+  exit 1
 fi
+
+fi # End of CD Install routine

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/component.cfg

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/component.png


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/component.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/install-check.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/install-check.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/install.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/install.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/remove.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdeoffice/remove.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/component.cfg

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/component.png


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/component.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/install-check.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/install-check.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/install.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/install.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/remove.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdesdk/remove.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/component.cfg

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/component.png


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/component.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/install-check.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/install-check.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/install.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/install.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/remove.sh


Property changes on: pcbsd/trunk/system-overlay/PCBSD/Components/kdetoys/remove.sh
___________________________________________________________________
Name: svn:executable
   + *



More information about the Commits mailing list