|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
#!/bin/sh |
|
|
|
|
# |
|
|
|
|
# 2010 Nico Schottelius (nico-cdist at schottelius.org) |
|
|
|
|
# 2011 Steven Armstrong (steven-cdist at armstrong.cc) |
|
|
|
|
# |
|
|
|
|
# This file is part of cdist. |
|
|
|
|
# |
|
|
|
@ -18,15 +18,19 @@ |
|
|
|
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
|
# |
|
|
|
|
# |
|
|
|
|
# __package is an abstract type which dispatches to the lower level |
|
|
|
|
# __package_$name types which do the actual interaction with the packaging |
|
|
|
|
# system. |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
# TODO: depend on package gentoolkit for qpkg |
|
|
|
|
|
|
|
|
|
os="$("$__explorer/os")" |
|
|
|
|
# TODO: |
|
|
|
|
# if /var/cache/eix is older then /usr/portage/metadata/timestamp |
|
|
|
|
# then run /usr/bin/eix-update |
|
|
|
|
# |
|
|
|
|
# check if package is installed: |
|
|
|
|
# |
|
|
|
|
# get currently installed version: |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
case "$os" in |
|
|
|
|
archlinux) echo pacman ;; |
|
|
|
|
debian|ubuntu) echo apt ;; |
|
|
|
|
gentoo) echo emerge ;; |
|
|
|
|
*) |
|
|
|
|
echo "Unknown OS: $os" >&2 |
|
|
|
|
exit 1 |
|
|
|
|
;; |
|
|
|
|
esac |