Skip to content
This repository has been archived by the owner on May 31, 2018. It is now read-only.

Commit

Permalink
added ClassifyPkgs()
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarquis committed Jul 20, 2011
1 parent ed3544c commit 920f14a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pacaur
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,20 @@ Core() {
CleanUp ${deps[@]}
}

ClassifyPkgs() {
if [[ $fallback = true ]]; then
[[ $repo ]] && repopkgs=${pkgs[@]}
[[ $aur ]] && aurpkgs=${pkgs[@]}
if [[ ! $repo && ! $aur ]]; then
for package in ${pkgs[@]}; do
[[ $($pacmanBin -S --print $package 2>&1 | grep -v "error:") == "" ]] && aurpkgs+=("$package") || repopkgs+=("$package")
done
fi
else
[[ ! $aur ]] && repopkgs=${pkgs[@]} || aurpkgs=${pkgs[@]}
fi
}

# sanity check
[[ ! -d $buildDir ]] && error "Build directory does not exist!\nCheck configuration in /etc/${name}.conf"
[[ ! -f /usr/bin/$pacmanBin ]] && error "Pacman binary does not exist!\nCheck configuration in /etc/${name}.conf"
Expand Down

0 comments on commit 920f14a

Please sign in to comment.