-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fakepac: example of how to find updates without using -Sy
- Loading branch information
1 parent
f3d5f3e
commit a87de05
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |||
|