[PC-BSD Commits] r954 - in pbibuild/modules/xmule: . overlay-dir

svn at pcbsd.org svn at pcbsd.org
Wed Dec 5 07:57:26 PST 2007


Author: kris
Date: 2007-12-05 07:57:26 -0800 (Wed, 05 Dec 2007)
New Revision: 954

Modified:
   pbibuild/modules/xmule/build.sh
   pbibuild/modules/xmule/copy-files
   pbibuild/modules/xmule/overlay-dir/PBI.RemoveScript.sh
   pbibuild/modules/xmule/overlay-dir/PBI.SetupScript.sh
Log:

Added new method of copying xmule.mo files to the scripts



Modified: pbibuild/modules/xmule/build.sh
===================================================================
--- pbibuild/modules/xmule/build.sh	2007-12-05 15:47:13 UTC (rev 953)
+++ pbibuild/modules/xmule/build.sh	2007-12-05 15:57:26 UTC (rev 954)
@@ -13,3 +13,18 @@
 sed -e "s,CHANGEME,xMule${PORTVER},g" ${PBIDIR}/scripts/removepbi.sh > /tmp/removepbi.sh
 mv /tmp/removepbi.sh ${PBIDIR}/scripts/removepbi.sh
 chmod 755 ${PBIDIR}/scripts/removepbi.sh
+
+
+# Get all the various language files and copy them to the PBI
+LANGFILE="xmule.mo"
+mkdir ${PBIDIR}/locale/
+cd /usr/local/share/locale
+for i in `ls`
+do
+  if [ -e "/usr/local/share/locale/${i}/LC_MESSAGES/${LANGFILE}" ]
+  then
+    mkdir ${PBIDIR}/locale/${i}
+    cp /usr/local/share/locale/${i}/LC_MESSAGES/${LANGFILE} ${PBIDIR}/locale/${i}/
+  fi
+done
+

Modified: pbibuild/modules/xmule/copy-files
===================================================================
--- pbibuild/modules/xmule/copy-files	2007-12-05 15:47:13 UTC (rev 953)
+++ pbibuild/modules/xmule/copy-files	2007-12-05 15:57:26 UTC (rev 954)
@@ -1,12 +1,3 @@
 /usr/local/bin/xmule bin/
 /usr/local/bin/xmule-ed2k-handler bin/
 /usr/local/share/applications/xmule.desktop share/applications/
-/usr/local/share/locale/de/LC_MESSAGES/xmule.mo share/locale/de/LC_MESSAGES/
-/usr/local/share/locale/ee/LC_MESSAGES/xmule.mo share/locale/ee/LC_MESSAGES/
-/usr/local/share/locale/es/LC_MESSAGES/xmule.mo share/locale/es/LC_MESSAGES/
-/usr/local/share/locale/es_MX/LC_MESSAGES/xmule.mo share/locale/es_MX/LC_MESSAGES/
-/usr/local/share/locale/fr/LC_MESSAGES/xmule.mo share/locale/fr/LC_MESSAGES/
-/usr/local/share/locale/it/LC_MESSAGES/xmule.mo share/locale/it/LC_MESSAGES/
-/usr/local/share/locale/ko/LC_MESSAGES/xmule.mo share/locale/ko/LC_MESSAGES/
-/usr/local/share/locale/pl/LC_MESSAGES/xmule.mo share/locale/pl/LC_MESSAGES/
-/usr/local/share/locale/tr/LC_MESSAGES/xmule.mo share/locale/tr/LC_MESSAGES/
\ No newline at end of file

Modified: pbibuild/modules/xmule/overlay-dir/PBI.RemoveScript.sh
===================================================================
--- pbibuild/modules/xmule/overlay-dir/PBI.RemoveScript.sh	2007-12-05 15:47:13 UTC (rev 953)
+++ pbibuild/modules/xmule/overlay-dir/PBI.RemoveScript.sh	2007-12-05 15:57:26 UTC (rev 954)
@@ -8,8 +8,16 @@
 #########################################
 rm -fR /usr/local/bin/xmule
 rm -fR /usr/local/bin/xmule-ed2k-handler
-rm -fR /usr/local/share/locale/*/LC_MESSAGES/xmule.mo
 
+# Remove the old locale files since we are uninstalling
+LANGFILE="xmule.mo"
+cd /Programs/${PROGDIR}/locale
+for i in `ls`
+do
+  rm /usr/local/share/locale/${i}/LC_MESSAGES/${LANGFILE}
+done
+
+
 cd /home 
  for i in `ls` 
  do 
@@ -21,4 +29,4 @@
        rm -fR /home/${i}/.xMule
      fi 
    fi 
- done 
\ No newline at end of file
+ done 

Modified: pbibuild/modules/xmule/overlay-dir/PBI.SetupScript.sh
===================================================================
--- pbibuild/modules/xmule/overlay-dir/PBI.SetupScript.sh	2007-12-05 15:47:13 UTC (rev 953)
+++ pbibuild/modules/xmule/overlay-dir/PBI.SetupScript.sh	2007-12-05 15:57:26 UTC (rev 954)
@@ -16,14 +16,14 @@
 #########################################
 ln -s /Programs/${PROGDIR}/.sbin/xmule /usr/local/bin/xmule
 ln -s /Programs/${PROGDIR}/.sbin/xmule-ed2k-handler /usr/local/bin/xmule-ed2k-handler
-cp /Programs/${PROGDIR}/share/locale/de/LC_MESSAGES/xmule.mo /usr/local/share/locale/de/LC_MESSAGES/xmule.mo
-cp /Programs/${PROGDIR}/share/locale/ee/LC_MESSAGES/xmule.mo /usr/local/share/locale/ee/LC_MESSAGES/xmule.mo
-cp /Programs/${PROGDIR}/share/locale/es/LC_MESSAGES/xmule.mo /usr/local/share/locale/es/LC_MESSAGES/xmule.mo
-cp /Programs/${PROGDIR}/share/locale/es_MX/LC_MESSAGES/xmule.mo /usr/local/share/locale/es_MX/LC_MESSAGES/xmule.mo
-cp /Programs/${PROGDIR}/share/locale/fr/LC_MESSAGES/xmule.mo /usr/local/share/locale/fr/LC_MESSAGES/xmule.mo
-cp /Programs/${PROGDIR}/share/locale/it/LC_MESSAGES/xmule.mo /usr/local/share/locale/it/LC_MESSAGES/xmule.mo
-cp /Programs/${PROGDIR}/share/locale/ko/LC_MESSAGES/xmule.mo /usr/local/share/locale/ko/LC_MESSAGES/xmule.mo
-cp /Programs/${PROGDIR}/share/locale/pl/LC_MESSAGES/xmule.mo /usr/local/share/locale/pl/LC_MESSAGES/xmule.mo
-cp /Programs/${PROGDIR}/share/locale/tr/LC_MESSAGES/xmule.mo /usr/local/share/locale/tr/LC_MESSAGES/xmule.mo
 
-echo "LAUNCHCLOSE: /usr/local/bin/xmule"
\ No newline at end of file
+# Copy over all the LANG files
+LANGFILE="xmule.mo"
+cd /Programs/${PROGDIR}/locale
+for i in `ls`
+do
+  mkdir -p /usr/local/share/locale/${i}/LC_MESSAGES >/dev/null 2>/dev/null
+  cp /Programs/${PROGDIR}/locale/${i}/${LANGFILE} /usr/local/share/locale/${i}/LC_MESSAGES/${LANGFILE}
+done
+
+echo "LAUNCHCLOSE: /usr/local/bin/xmule"



More information about the Commits mailing list