Skip to content

Commit

Permalink
fakepac: example of how to find updates without using -Sy
Browse files Browse the repository at this point in the history
  • Loading branch information
falconindy committed May 24, 2011
1 parent f3d5f3e commit a87de05
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fakepac
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

shopt -s extglob

fakedb=/dev/shm/fakepacdb
realdb=/var/lib/pacman

[[ ! -d $fakedb ]] && { mkdir -p "$fakedb/sync" || exit 1; }
[[ ! -L $fakedb/local ]] && { ln -s "$realdb/local" "$fakedb" || exit 2; }

case $1 in
-Sy|-Syy) exec fakeroot pacman --dbpath "$fakedb" $1 ;;
-@(S|U)*) echo "action not allowed" ;;
*) exec pacman --dbpath "$fakedb" $1 ;;
esac

0 comments on commit a87de05

Please sign in to comment.