<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-#!/bin/bash 
+#!/bin/bash
 set -o nounset
 shopt -s nullglob
 umask 022
@@ -33,32 +33,33 @@ esac
 
 FILESEXT=&quot;${DBEXT//db/files}&quot;
 
-cd $reposdir
 for repo in $repos; do
-    REPO_DB_FILE=${repo}$FILESEXT
+    REPO_DB_FILE=&quot;${repo}$FILESEXT&quot;
     for arch in ${ARCHES[@]}; do
+        cd &quot;$reposdir&quot;
+
         repodir=games/${arch}/
         cached=&quot;no&quot;
 
         # extract old file archive
-        if [ -f ${targetdir}${repodir}${REPO_DB_FILE} ]; then
-            mkdir -p ${CACHEDIR}/${repodir}
-            bsdtar -xf ${targetdir}${repodir}${REPO_DB_FILE} -C ${CACHEDIR}/${repodir}
+        if [ -f &quot;${targetdir}/${repodir}/${REPO_DB_FILE}&quot; ]; then
+            mkdir -p &quot;${CACHEDIR}/${repodir}&quot;
+            bsdtar -xf &quot;${targetdir}/${repodir}/${REPO_DB_FILE}&quot; -C &quot;${CACHEDIR}/${repodir}&quot;
             cached=&quot;yes&quot;
         fi
 
         # create file lists
         for pkg in $repodir*${PKGEXT}; do
-            pkgname=$(getpkgname $pkg)
-            tmppkgdir=${TMPDIR}/${repodir}${pkgname}/
-            mkdir -p $tmppkgdir
-            if [ -f &quot;${CACHEDIR}/${repodir}${pkgname}/files&quot; ]; then
-                #echo &quot;cache: $pkgname&quot;
-                mv ${CACHEDIR}/${repodir}${pkgname}/files ${tmppkgdir}files
+            pkgname=$(getpkgname &quot;$pkg&quot;)
+            tmppkgdir=&quot;${TMPDIR}/${repodir}/${pkgname}/&quot;
+            mkdir -p &quot;$tmppkgdir&quot;
+            if [ -f &quot;${CACHEDIR}/${repodir}/${pkgname}/files&quot; ]; then
+#               echo &quot;cache: $pkgname&quot;
+                mv &quot;${CACHEDIR}/${repodir}/${pkgname}/files&quot; &quot;${tmppkgdir}/files&quot;
             else
-                #echo &quot;$repo/$arch: $pkgname&quot;
-                echo '%FILES%' &gt; ${tmppkgdir}files
-                bsdtar --exclude=.* -tf $pkg &gt;&gt; ${tmppkgdir}files
+#               echo &quot;$repo/$arch: $pkgname&quot;
+                echo '%FILES%' &gt; &quot;${tmppkgdir}/files&quot;
+                bsdtar --exclude=.* -tf &quot;$pkg&quot; &gt;&gt; &quot;${tmppkgdir}/files&quot;
                 cached=&quot;no&quot;
             fi
         done
@@ -67,20 +68,18 @@ for repo in $repos; do
         if [ &quot;$cached&quot; == &quot;no&quot; ]; then
             # at least one package has changed, so let's rebuild the archive
 #           echo &quot;creating ${REPO_DB_FILE}/${arch}&quot;
-            pkgdir=${targetdir}${repodir}
-            mkdir -p $pkgdir
-            cd ${TMPDIR}/${repodir}
-            [ -f &quot;${pkgdir}${REPO_DB_FILE}.old&quot; ] &amp;&amp; rm &quot;${pkgdir}${REPO_DB_FILE}.old&quot;
-            [ -f &quot;${pkgdir}${REPO_DB_FILE}&quot; ] &amp;&amp; mv &quot;${pkgdir}${REPO_DB_FILE}&quot; &quot;${pkgdir}${REPO_DB_FILE}.old&quot;
-            bsdtar --exclude=*${DBEXT//\.db/} -c${TAR_OPT}f ${pkgdir}${REPO_DB_FILE} *
+            pkgdir=&quot;${targetdir}/${repodir}&quot;
+            mkdir -p &quot;$pkgdir&quot;
+            cd &quot;${TMPDIR}/${repodir}&quot;
+            [ -f &quot;${pkgdir}/${REPO_DB_FILE}.old&quot; ] &amp;&amp; rm &quot;${pkgdir}/${REPO_DB_FILE}.old&quot;
+            [ -f &quot;${pkgdir}/${REPO_DB_FILE}&quot; ] &amp;&amp; mv &quot;${pkgdir}/${REPO_DB_FILE}&quot; &quot;${pkgdir}/${REPO_DB_FILE}.old&quot;
+            bsdtar --exclude=*${DBEXT//\.db/} -c${TAR_OPT}f &quot;${pkgdir}/${REPO_DB_FILE}&quot; *
         fi
-
-        cd $reposdir
     done
 done
 
 cd - &gt;/dev/null
-rm -rf $TMPDIR || exit 1
-rm -rf $CACHEDIR || exit 1
+rm -rf &quot;$TMPDIR&quot; || exit 1
+rm -rf &quot;$CACHEDIR&quot; || exit 1
 rm -f &quot;/tmp/createFileList.lock&quot; || exit 1
 # echo 'done'</diff>
      <filename>scripts/filelist/createFileLists</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e0b7a433c78ca7afcb33673c6d0661660308d95b</id>
    </parent>
  </parents>
  <author>
    <name>Daenyth</name>
    <email>Daenyth+github@gmail.com</email>
  </author>
  <url>http://github.com/Stythys/arch-games/commit/fa2a6bc9be49421289ac73689f5a0d06bbebfe33</url>
  <id>fa2a6bc9be49421289ac73689f5a0d06bbebfe33</id>
  <committed-date>2009-10-31T09:25:15-07:00</committed-date>
  <authored-date>2009-10-31T09:25:15-07:00</authored-date>
  <message>createFileLists: Cleanup merged from upstream

Mostly.
Signed-off-by: Daenyth &lt;Daenyth+github@gmail.com&gt;</message>
  <tree>ba606ee374a2df49962df5b28d7f2496aeaa6d74</tree>
  <committer>
    <name>Daenyth</name>
    <email>Daenyth+github@gmail.com</email>
  </committer>
</commit>
