diff --git a/build.sh b/build.sh index aa5da84..f21bad2 100755 --- a/build.sh +++ b/build.sh @@ -30,11 +30,11 @@ main() { echo -e "$Red### You are not in root$reset" exit 1 else + change_mirror install echo -e "$Blue### Install complete ###$reset" echo -e "$Green### Start build $reponame with archiso ###$reset" build - makezip fi else echo -e "$Red###OS can't supported###$reset" @@ -42,19 +42,20 @@ main() { fi } + install() { set -e - pacman -Sy; pacman --noconfirm -S --needed git archiso github-cli p7zip + pacman -Sy; pacman --noconfirm -S --needed git archiso github-cli p7zip reflector rsync } + +change_mirror() { + reflector --latest 5 --sort rate --save /etc/pacman.d/mirrorlist +} + build() { set -e mkarchiso -v iso/ } -makezip() { - cd out - 7z -v500m a "$(ls *.iso)".zip "$(ls *.iso)" - md5sum * > md5sums.txt -} main