Scripts: removed .pacman-init and renamed pacman-files
parent
83136ad8d5
commit
95ded549bb
|
@ -1,31 +0,0 @@
|
|||
#!/bin/sh
|
||||
# This file is not supposed to be executed directly. It is a common resource file
|
||||
# for all pacman functions.
|
||||
|
||||
# Support: pacman 4.1
|
||||
|
||||
if ! command -v pacman >/dev/null; then
|
||||
echo "You need the pacman package manager."
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! command -v makepkg >/dev/null; then
|
||||
echo "You need makepkg (the pacman package builder)."
|
||||
exit
|
||||
fi
|
||||
|
||||
## We use tzdata as reference for the output fields, because it is almost always
|
||||
## installed. This let's us access the entry of pacman's output independently of
|
||||
## the current locale.
|
||||
pacman_var_list="$(pacman -Qi tzdata | cut -f1 -d':')"
|
||||
if [ -z "$pacman_var_list" ]; then
|
||||
echo "Could not get pacman's variables."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
pacman_name="$(echo "$pacman_var_list" | sed -n '1{p;q}')"
|
||||
pacman_deps="$(echo "$pacman_var_list" | sed -n '9{p;q}')"
|
||||
pacman_deps_none="$(pacman -Qi tzdata | sed -n '9{s/.*: //;p;q}')"
|
||||
pacman_optdeps="$(echo "$pacman_var_list" | sed -n '10{p;q}')"
|
||||
pacman_size="$(echo "$pacman_var_list" | sed -n '15{p;q}')"
|
||||
|
Loading…
Reference in New Issue