diff options
author | Simon Doppler <dopsi@dopsi.ch> | 2017-08-08 12:44:27 +0200 |
---|---|---|
committer | Simon Doppler <dopsi@dopsi.ch> | 2017-08-08 12:44:27 +0200 |
commit | 7e38635cf035af09a17864146b3701ea104c29df (patch) | |
tree | aee390f36d1ea4947bce8d2c0e218c6aec5c5f51 | |
parent | 01578696cb5b8fc18f36f1b639399c9c3c0ead36 (diff) | |
download | releng-7e38635cf035af09a17864146b3701ea104c29df.tar.xz |
Clean up directory before building new files
-rw-r--r-- | al32-mktorrent.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/al32-mktorrent.sh b/al32-mktorrent.sh index 68ea265..d4c5d19 100644 --- a/al32-mktorrent.sh +++ b/al32-mktorrent.sh @@ -28,6 +28,11 @@ fg_bold="\033[1m" MIRRORLIST_FILE="https://raw.githubusercontent.com/archlinux32/packages/master/core/pacman-mirrorlist/mirrorlist" +function cleanup () { + echo -n -e "$fg_reset${fg_bold}Cleaning up directory...$fg_reset " + rm -f archlinux-2017.08.01-dual.iso.sig archlinux-2017.08.01-dual.iso.torrent archlinux-2017.08.01-i686.iso.sig archlinux-2017.08.01-i686.iso.torrent feed_dual.rss feed_i686.rss sha512sums +} + function create_torrent_for_arch () { declare -a available_mirrors mirrorlist="$(curl "$MIRRORLIST_FILE" 2>/dev/null | grep Server | cut -d '=' -f 2 | sed -e 's/\s//g;s_$arch/$repo_archisos/_')" @@ -118,6 +123,8 @@ fi [ -z "$iso_date" ] && read -r -p "Date of the ISO: " iso_date +cleanup + for a in "${architectures[@]}" ; do create_torrent_for_arch "$a" done |