kek
This commit is contained in:
parent
8d262d67be
commit
c2b5d134a4
|
@ -8,10 +8,5 @@ self_url="https://pkg.fleshless.org/$self"
|
|||
spark_repo=$(<spark.repo)
|
||||
spark_repo_path="$HOME/public/$spark_repo"
|
||||
|
||||
suex makepkg-overlay "$self_url" "$spark_repo_path"
|
||||
|
||||
cd "$spark_repo_path"
|
||||
"$HOME/scripts/repo-sign" &> "$HOME/log/repo-sign.$spark_repo.log"
|
||||
"$HOME/scripts/repo-clean" &> "$HOME/log/repo-clean.$spark_repo.log"
|
||||
|
||||
repo-add -n "$spark_repo.db.tar.gz" *.pkg.tar.xz &> "$HOME/log/repo-add.$spark_repo.log"
|
||||
suex makepkg-overlay "$self_url" "$spark_repo_path/import"
|
||||
repo-maintenance "$spark_repo"
|
||||
|
|
|
@ -34,6 +34,7 @@ _pacsort() {
|
|||
while (( $# )); do
|
||||
case "$1" in
|
||||
-r) flag_rm=1;;
|
||||
-d) flag_debug=1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
@ -59,7 +60,7 @@ done
|
|||
|
||||
for f in ${package_files[@]}; do
|
||||
if is_latest "$f"; then
|
||||
printf '%s is the latest version available\n' "$f"
|
||||
(( flag_debug )) && printf '%s is the latest version available\n' "$f"
|
||||
else
|
||||
printf 'Removing: %s\n' "$f"
|
||||
|
||||
|
|
48
repo-maintenance
Executable file
48
repo-maintenance
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env bash
|
||||
shopt -s nullglob
|
||||
|
||||
lockfile='.mainenance.lock'
|
||||
|
||||
usage() { echo "$0 <repo_name>"; }
|
||||
|
||||
spark_repo=$1
|
||||
[[ "$spark_repo" ]] || {
|
||||
usage
|
||||
exit 1
|
||||
}
|
||||
|
||||
cleanup() { rm -f "$lockfile"; }
|
||||
|
||||
lock() {
|
||||
[[ -f "$lockfile" ]] && {
|
||||
printf 'Lockfile found: %s\n' "$lockfile" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
echo $$ > "$lockfile"
|
||||
lock_pid=$(<"$lockfile")
|
||||
[[ $$ == "$lock_pid" ]] || return 1
|
||||
}
|
||||
|
||||
cd "$HOME/public/$spark_repo" || exit $?
|
||||
|
||||
lock || exit 1
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
for f in import/*; do
|
||||
f_name="${f##*/}"
|
||||
if [[ -f "$f_name" ]]; then
|
||||
printf 'Package already exists: %s, not overwriting\n' "$f_name" >&2
|
||||
else
|
||||
mv -vf "$f" ./
|
||||
new_pkgs+=( "$f_name" )
|
||||
fi
|
||||
done
|
||||
|
||||
repo-sign
|
||||
repo-clean
|
||||
|
||||
for p in "${new_pkgs[@]}"; do
|
||||
repo-add -n "$spark_repo.db.tar.gz" "$p"
|
||||
done
|
Loading…
Reference in New Issue
Block a user