Skip to content

Commit

Permalink
clean old directories
Browse files Browse the repository at this point in the history
  • Loading branch information
plengauer committed Sep 12, 2023
1 parent e38e008 commit b06b29a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: gitaptly
Version: 1.5.1
Version: 1.5.2
Architecture: all
Depends: debconf, bash, cron, gzip, dpkg-dev, wget, python3, python3-pip, python3-venv
Priority: extra
Expand Down
4 changes: 3 additions & 1 deletion package/usr/bin/gitaptly_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cd /var/lib/gitaptly/apt-repo
mode=$(bash /usr/bin/gitaptly_mode.sh 2>&1 | sed 's/ *$//g')

if [ "$mode" = 'cache' ]; then
rm -rf cgi-bin/pool/main/*
while read line; do
line=$(echo "$line" | xargs)
if [ -z "$line" ]; then
Expand All @@ -18,6 +19,7 @@ if [ "$mode" = 'cache' ]; then
dpkg-scanpackages --multiversion pool/ > dists/stable/main/binary-all/Packages

elif [ "$mode" = 'proxy' ]; then
rm -rf pool/main/*
while read line; do
line=$(echo "$line" | xargs)
if [ -z "$line" ]; then
Expand All @@ -26,7 +28,7 @@ elif [ "$mode" = 'proxy' ]; then
owner=$(echo $line | cut -d "/" -f 1)
repo=$(echo $line | cut -d "/" -f 2)
mkdir -p pool/main/$owner/$repo cgi-bin/pool/main/$owner/$repo
rm dists/stable/main/binary-all/Packages
rm -f dists/stable/main/binary-all/Packages
for url in $(bash /usr/bin/gitaptly_scan.sh $owner $repo)
do
file=$(echo $url | rev | cut -d "/" -f 1 | rev)
Expand Down

0 comments on commit b06b29a

Please sign in to comment.