aps/altools/repo
2021-09-30 16:26:01 +02:00

18 lines
523 B
Bash
Executable file

#!/bin/sh
########################################
# Repo, a repository manager for alnux #
########################################
. /etc/al/config
case $1 in
# add a repo
add) git clone ${2} ${install_root}/var/db/repos
echo "${2}" >> ${install_root}/etc/al/repo.conf
;;
# update a repo
update) pushd && cd ${install_root}/var/aps/repos/${2} && git pull && popd ;;
# destroy a repo (remove)
destroy) rm -rfv ${install_root}/var/db/aps/repos/${2}
sed -i "/^${2}/d" ${install_root}/etc/al/repo.conf
;;
esac