diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkgs | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1,14 +1,14 @@ #!/usr/bin/env bash -set -euo pipefail +set -eu # source makepkg.conf to use PACKAGER . /etc/makepkg.conf # shellcheck source=/dev/null [ -f "${HOME}/.makepkg.conf" ] && . "${HOME}/.makepkg.conf" -package_dir_base="$HOME/packages/" -nvchecker_config="${HOME}/.config/nvchecker/nvchecker.ini" +package_dir_base="${HOME}/packages/" +nvchecker_config="${HOME}/.config/nvchecker/nvchecker.toml" repo="" package="" mode="" @@ -33,6 +33,8 @@ declare -A package_dirs=( ["extra"]="${package_dir_base}extra" ) +# TODO: check whether git and subversion are installed + create_tmp_packagelist() { local list_file="" list_file=$(basename "$1") @@ -43,6 +45,10 @@ add_package() { local name="$1" local tmp_file="" tmp_file=$(create_tmp_packagelist "${package_lists[$repo]}") + if [[ ! -f "${package_lists[$repo]}" ]]; then + echo "Adding initial package list: ${package_lists[$repo]}" + touch "${package_lists[$repo]}" + fi echo "Adding $package to list of $repo packages." echo "$name" | cat "${package_lists[$repo]}" - |uniq |sort > "$tmp_file" cat "$tmp_file" > "${package_lists[$repo]}" @@ -108,6 +114,7 @@ create_repo_dir() { else ( echo "Checking out $repo directory." + mkdir -pv "$(dirname "${package_dirs[$repo]}")" cd "$(dirname "${package_dirs[$repo]}")" svn checkout -N "${upstreams[$repo]}" \ "$(basename "${package_dirs[$repo]}")" |