Commits

Kuan-Chung Huang  committed 44f98b0

vcprompt: Update README and remove unnecessary files

  • Participants
  • Parent commits 20d36ab

Comments (0)

Files changed (2)

File vcprompt/README

-vcprompt can add version control information in your prompt.
-Supported version control systems are: bzr, cvs, darcs, fossil, git, hg, svn.
+vcprompt is a small utility for displaying information about version control
+repositories in your prompt (or anywhere).
+vcprompt is aware of the following version control systems:
+- Bazaar
+- CVS
+- Darcs
+- Fossil
+- Git
+- Mercurial
+- Subversion

File vcprompt/vcprompt.SlackBuild

 COMMIT_ID=f18cfcd47e20673b513def197696495cbb0225a1
 SRCDIR=$SRCNAM-$(echo $COMMIT_ID | cut -b-7)
 
-ARCH=noarch
+if [ -z "$ARCH" ]; then
+  case "$( uname -m )" in
+    i?86) ARCH=i486 ;;
+    arm*) ARCH=arm ;;
+       *) ARCH=$( uname -m ) ;;
+  esac
+fi
 
 CWD=$(pwd)
 TMP=${TMP:-/tmp/SBo}
 PKG=$TMP/package-$PRGNAM
 OUTPUT=${OUTPUT:-/tmp}
 
+if [ "$ARCH" = "i486" ]; then
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+  LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+  LIBDIRSUFFIX="64"
+else
+  LIBDIRSUFFIX=""
+fi
+
+# Force noarch
+ARCH=noarch
+
 set -eu 
 
 rm -rf $PKG
 
 python setup.py install --root=$PKG
 
+# Remove unnecessary files
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}
+
 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
   | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true