Update
This commit is contained in:
parent
d441feab19
commit
8481ff48c5
110
make.sh
110
make.sh
|
@ -8,7 +8,7 @@ else
|
|||
echo "USER IS ROOT"
|
||||
fi
|
||||
|
||||
DELAY=3
|
||||
DELAY=1
|
||||
|
||||
function check_internet() {
|
||||
ping -c 1 1.1.1.1 > /dev/null
|
||||
|
@ -23,9 +23,19 @@ function check_internet() {
|
|||
function clean() {
|
||||
echo "CLEAN"
|
||||
|
||||
if [ -n "$dir" ]; then
|
||||
cd $dir
|
||||
echo "PWD: $(pwd)"
|
||||
else
|
||||
exit
|
||||
fi
|
||||
|
||||
rm -v airootfs/opt/extra-drivers/*.pkg.tar.*
|
||||
rm -v airootfs/root/packages/*.pkg.tar.*
|
||||
rm -v airootfs/usr/share/packages/*.pkg.tar.*
|
||||
|
||||
cd "$(dirname $0)"
|
||||
echo "PWD: $(dirname $0)"
|
||||
}
|
||||
|
||||
function mirrorlist() {
|
||||
|
@ -43,6 +53,13 @@ function prepare() {
|
|||
|
||||
check_internet
|
||||
|
||||
if [ -n "$dir" ]; then
|
||||
cd $dir
|
||||
echo "PWD: $(pwd)"
|
||||
else
|
||||
exit
|
||||
fi
|
||||
|
||||
pacman -Sy --config pacman_sys.conf
|
||||
pacman -Sw --config pacman_sys.conf --noconfirm --cachedir "./airootfs/opt/extra-drivers" r8168-dkms
|
||||
|
||||
|
@ -78,6 +95,9 @@ function prepare() {
|
|||
chown -R 1000:1000 ./airootfs/opt/extra-drivers/
|
||||
chown -R 1000:1000 ./airootfs/usr/share/packages/
|
||||
chown -R 1000:1000 ../boot/iso
|
||||
|
||||
cd "$(dirname $0)"
|
||||
echo "PWD: $(dirname $0)"
|
||||
}
|
||||
|
||||
|
||||
|
@ -86,6 +106,13 @@ function build() {
|
|||
|
||||
check_internet
|
||||
|
||||
if [ -n "$dir" ]; then
|
||||
cd $dir
|
||||
echo "PWD: $(pwd)"
|
||||
else
|
||||
exit
|
||||
fi
|
||||
|
||||
rm -rfv "../work_${edition}"
|
||||
mkdir -pv "../boot/"{fd,iso,qcow2,shell_scripts,txt} 2>/dev/null
|
||||
mkdir -pv "../sf" 2>/dev/null
|
||||
|
@ -94,59 +121,91 @@ function build() {
|
|||
|
||||
cp -vf "/etc/pacman.d/mirrorlist" "./airootfs/etc/pacman.d/"
|
||||
|
||||
if [ -f "../sf/${iso_dir}/${iso_name}.iso" ]; then rm "../sf/${iso_dir}/${iso_name}.iso"; fi
|
||||
if [ -f "../sf/${iso_dir}/${iso_name}.iso" ]; then
|
||||
rm "../sf/${iso_dir}/${iso_name}.iso"
|
||||
fi
|
||||
./mkarchiso_last_my -v "."
|
||||
|
||||
cd "$(dirname $0)"
|
||||
echo "PWD: $(dirname $0)"
|
||||
}
|
||||
|
||||
function sign() {
|
||||
if [ -f "../sf/${iso_dir}/${std_iso_name}.iso" ] || [ -f "../sf/${iso_dir}/${iso_name}.iso" ] ; then
|
||||
if [ -n "$dir" ]; then
|
||||
cd "sf/${iso_dir}"
|
||||
echo "PWD: $(pwd)"
|
||||
else
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -f "${std_iso_name}.iso" ] || [ -f "${iso_name}.iso" ]; then
|
||||
echo "SIGN, SUM, TORRENT"
|
||||
|
||||
cp "../verify.sh" "../sf/${iso_dir}/"
|
||||
cp -v "../../verify.sh" "."
|
||||
|
||||
if [ -f "../sf/${iso_dir}/${iso_name}-pkglist.txt" ]; then
|
||||
rm "../sf/${iso_dir}/${iso_name}-pkglist.txt";
|
||||
if [ -f "${iso_name}-pkglist.txt" ]; then
|
||||
rm "${iso_name}-pkglist.txt";
|
||||
fi
|
||||
cp -vf "../work_${edition}/iso/arch/pkglist.x86_64.txt" "../sf/${iso_dir}/${iso_name}-pkglist.txt"
|
||||
cp -vf "../../work_${edition}/iso/arch/pkglist.x86_64.txt" "${iso_name}-pkglist.txt"
|
||||
|
||||
if [ -f "../sf/${iso_dir}/${std_iso_name}.iso" ]; then
|
||||
mv "../sf/${iso_dir}/${std_iso_name}.iso" "../sf/${iso_dir}/${iso_name}.iso";
|
||||
if [ -f "${std_iso_name}.iso" ]; then
|
||||
mv "${std_iso_name}.iso" "${iso_name}.iso";
|
||||
fi
|
||||
|
||||
if [ -f "../sf/${iso_dir}/${iso_name}.iso.sig" ]; then
|
||||
rm "../sf/${iso_dir}/${iso_name}.iso.sig";
|
||||
if [ -f "${iso_name}.iso.sig" ]; then
|
||||
rm "${iso_name}.iso.sig";
|
||||
fi
|
||||
echo "Sign ../sf/${iso_dir}/${iso_name}.iso.sig ../sf/${iso_dir}/${iso_name}.iso"
|
||||
echo "Sign ${iso_name}.iso.sig ${iso_name}.iso"
|
||||
|
||||
su $(who | grep "tty" | cut -d" " -f1) -c "gpg --detach-sign --local-user BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8 --output '../sf/${iso_dir}/${iso_name}.iso.sig' '../sf/${iso_dir}/${iso_name}.iso'"
|
||||
|
||||
cd "../sf/${iso_dir}"
|
||||
su $(who | grep "tty" | cut -d" " -f1) -c "gpg --detach-sign --local-user BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8 --output '${iso_name}.iso.sig' '${iso_name}.iso'"
|
||||
|
||||
if [ -f "${iso_name}.iso.md5" ]; then
|
||||
rm "${iso_name}.iso.md5";
|
||||
fi
|
||||
echo "md5sum ${iso_name}.iso"
|
||||
md5sum "${iso_name}.iso" > "${iso_name}.iso.md5"
|
||||
md5sum "${iso_name}.iso" > "${iso_name}.iso.md5"
|
||||
|
||||
if [ -f "${iso_name}.iso.sha1" ]; then
|
||||
rm "${iso_name}.iso.sha1";
|
||||
fi
|
||||
echo "sha1sum ${iso_name}.iso"
|
||||
sha1sum "${iso_name}.iso" > "${iso_name}.iso.sha1"
|
||||
sha1sum "${iso_name}.iso" > "${iso_name}.iso.sha1"
|
||||
|
||||
if [ -f "${iso_name}.iso.sha256" ]; then
|
||||
rm "${iso_name}.iso.sha256";
|
||||
fi
|
||||
echo "sha256sum ${iso_name}.iso"
|
||||
sha256sum "${iso_name}.iso" > "${iso_name}.iso.sha256"
|
||||
sha256sum "${iso_name}.iso" > "${iso_name}.iso.sha256"
|
||||
|
||||
cd ".."
|
||||
|
||||
if [ -f "${iso_dir}/${iso_name}.torrent" ]; then rm "${iso_dir}/${iso_name}.torrent"; fi
|
||||
mktorrent --verbose --comment="https://melawy.ru" --announce="udp://fosstorrents.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://opentracker.i2p.rocks:6969/announce,udp://open.demonii.com:1337/announce,udp://tracker.openbittorrent.com:6969/announce,http://tracker.openbittorrent.com:80/announce,udp://open.stealth.si:80/announce,udp://tracker.torrent.eu.org:451/announce,udp://exodus.desync.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker.moeking.me:6969/announce,udp://explodie.org:6969/announce,https://tracker.tamersunion.org:443/announce,udp://uploads.gamecoast.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.bittor.pw:1337/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://movies.zsw.ca:6969/announce,udp://isk.richardsw.club:6969/announce,https://tracker.renfei.net:443/announce,https://tr.burnabyhighstar.com:443/announce,http://fosstorrents.com:6969/announce" --output="${iso_dir}/${iso_name}.torrent" "${iso_dir}"
|
||||
if [ -f "${iso_dir}/${iso_name}.torrent" ]; then
|
||||
rm "${iso_dir}/${iso_name}.torrent"
|
||||
fi
|
||||
|
||||
baselink="https://downloads.sourceforge.net/project/melawy-linux/${iso_dir}"
|
||||
links=""
|
||||
|
||||
for i in $(ls -1 ${iso_dir})
|
||||
do
|
||||
links+=$(echo "$baselink/$i," | grep -v "torrent" | tr -d '[:blank:]' | tr -d '[:space:]' | tr -d '[:cntrl:]' | sed 's/[/]$//' | awk '{$1=$1;print}')
|
||||
done
|
||||
|
||||
links=$(echo $links | sed 's/[,]$//' | tr -d '[:blank:]' | tr -d '[:space:]' | tr -d '[:cntrl:]' | sed 's/[/]$//' | awk '{$1=$1;print}')
|
||||
|
||||
# mktorrent --verbose --comment="https://melawy.ru" --announce="udp://fosstorrents.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://opentracker.i2p.rocks:6969/announce,udp://open.demonii.com:1337/announce,udp://tracker.openbittorrent.com:6969/announce,http://tracker.openbittorrent.com:80/announce,udp://open.stealth.si:80/announce,udp://tracker.torrent.eu.org:451/announce,udp://exodus.desync.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker.moeking.me:6969/announce,udp://explodie.org:6969/announce,https://tracker.tamersunion.org:443/announce,udp://uploads.gamecoast.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.bittor.pw:1337/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://movies.zsw.ca:6969/announce,udp://isk.richardsw.club:6969/announce,https://tracker.renfei.net:443/announce,https://tr.burnabyhighstar.com:443/announce,http://fosstorrents.com:6969/announce" --web-seed="${links}" --output="${iso_dir}/${iso_name}.torrent" "${iso_dir}"
|
||||
|
||||
# transmission-create --anonymize --comment="https://melawy.ru" --tracker="udp://fosstorrents.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://opentracker.i2p.rocks:6969/announce,udp://open.demonii.com:1337/announce,udp://tracker.openbittorrent.com:6969/announce,http://tracker.openbittorrent.com:80/announce,udp://open.stealth.si:80/announce,udp://tracker.torrent.eu.org:451/announce,udp://exodus.desync.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker.moeking.me:6969/announce,udp://explodie.org:6969/announce,https://tracker.tamersunion.org:443/announce,udp://uploads.gamecoast.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.bittor.pw:1337/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://movies.zsw.ca:6969/announce,udp://isk.richardsw.club:6969/announce,https://tracker.renfei.net:443/announce,https://tr.burnabyhighstar.com:443/announce,http://fosstorrents.com:6969/announce" --webseed="${links}" --outfile="${iso_dir}/${iso_name}.torrent" "${iso_dir}"
|
||||
|
||||
# buildtorrent --nodate --nocreator --md5sum --show --comment="https://melawy.ru" --announce="udp://fosstorrents.com:6969/announce" --announcelist="udp://fosstorrents.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://opentracker.i2p.rocks:6969/announce,udp://open.demonii.com:1337/announce,udp://tracker.openbittorrent.com:6969/announce,http://tracker.openbittorrent.com:80/announce,udp://open.stealth.si:80/announce,udp://tracker.torrent.eu.org:451/announce,udp://exodus.desync.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker.moeking.me:6969/announce,udp://explodie.org:6969/announce,https://tracker.tamersunion.org:443/announce,udp://uploads.gamecoast.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.bittor.pw:1337/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://movies.zsw.ca:6969/announce,udp://isk.richardsw.club:6969/announce,https://tracker.renfei.net:443/announce,https://tr.burnabyhighstar.com:443/announce,http://fosstorrents.com:6969/announce" --webseeds="${links}" "${iso_dir}" "${iso_dir}/${iso_name}.torrent"
|
||||
|
||||
buildtorrent --nodate --nocreator --md5sum --show --comment="https://melawy.ru" --announce="udp://fosstorrents.com:6969/announce" --announcelist="udp://fosstorrents.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://opentracker.i2p.rocks:6969/announce,udp://open.demonii.com:1337/announce,udp://tracker.openbittorrent.com:6969/announce,http://tracker.openbittorrent.com:80/announce,udp://open.stealth.si:80/announce,udp://tracker.torrent.eu.org:451/announce,udp://exodus.desync.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker.moeking.me:6969/announce,udp://explodie.org:6969/announce,https://tracker.tamersunion.org:443/announce,udp://uploads.gamecoast.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.bittor.pw:1337/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://movies.zsw.ca:6969/announce,udp://isk.richardsw.club:6969/announce,https://tracker.renfei.net:443/announce,https://tr.burnabyhighstar.com:443/announce,http://fosstorrents.com:6969/announce" "${iso_dir}" "${iso_dir}/${iso_name}.torrent"
|
||||
|
||||
chown -R 1000:1000 ../sf
|
||||
fi
|
||||
|
||||
cd "$(dirname $0)"
|
||||
echo "PWD: $(dirname $0)"
|
||||
}
|
||||
|
||||
function std_build() {
|
||||
|
@ -240,13 +299,7 @@ _EOF_
|
|||
else
|
||||
echo "Invalid entry."
|
||||
sleep $DELAY
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -n "$dir" ]; then
|
||||
cd $dir
|
||||
else
|
||||
exit
|
||||
continue
|
||||
fi
|
||||
|
||||
# clear
|
||||
|
@ -265,7 +318,7 @@ _EOF_
|
|||
|
||||
read -p "Enter selection [0-6] > "
|
||||
|
||||
edition="$(basename $(pwd))"
|
||||
edition="$(basename $(pwd)/${dir})"
|
||||
date_tag=$(date +%Y.%m.%d)
|
||||
std_iso_name="Melawy-Linux-${date_tag}-x86_64"
|
||||
iso_name="${edition}-${date_tag}-x86_64"
|
||||
|
@ -310,6 +363,7 @@ _EOF_
|
|||
else
|
||||
echo "Invalid entry."
|
||||
sleep $DELAY
|
||||
continue
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -1,3 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
rsync -avP --progress -e "ssh" $(find ./sf -type d -iname "*full*") "10.120.152.1:/var/lib/transmission/Downloads/"
|
||||
ip1="10.120.152.1"
|
||||
ip2="192.168.1.250"
|
||||
|
||||
ip r | grep 10.120.152.1
|
||||
if [[ $? == 0 ]]; then
|
||||
ping -c 1 10.120.152.1
|
||||
if [[ $? == 0 ]]; then
|
||||
ip=$ip1
|
||||
fi
|
||||
else
|
||||
ping -c 1 192.168.1.250
|
||||
if [[ $? == 0 ]]; then
|
||||
ip=$ip2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$ip" ]]; then
|
||||
echo "Sending"
|
||||
|
||||
rsync -avP --progress -e "ssh" $(find ./sf -type d -iname "*full*") "${ip}:/var/lib/transmission/Downloads/"
|
||||
|
||||
for i in $(find "./sf/" -name "*.torrent")
|
||||
do
|
||||
rsync -avP --delete-after --progress -e "ssh" "$i" "${ip}:/var/lib/transmission/torrents/"
|
||||
status=$(( $status + $? ))
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Ready"
|
||||
if [ "$status" == 0 ]; then
|
||||
sleep 5
|
||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
||||
fi
|
||||
|
|
|
@ -1,3 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
rsync -avP --progress -e "ssh" $(find ./sf -type d -iname "*netinstall*") "10.120.152.1:/var/lib/transmission/Downloads/"
|
||||
ip1="10.120.152.1"
|
||||
ip2="192.168.1.250"
|
||||
|
||||
ip r | grep 10.120.152.1
|
||||
if [[ $? == 0 ]]; then
|
||||
ping -c 1 10.120.152.1
|
||||
if [[ $? == 0 ]]; then
|
||||
ip=$ip1
|
||||
fi
|
||||
else
|
||||
ping -c 1 192.168.1.250
|
||||
if [[ $? == 0 ]]; then
|
||||
ip=$ip2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$ip" ]]; then
|
||||
echo "Sending"
|
||||
|
||||
rsync -avP --progress -e "ssh" $(find ./sf -type d -iname "*netinstall*") "${ip}:/var/lib/transmission/Downloads/"
|
||||
|
||||
for i in $(find "./sf/" -name "*.torrent")
|
||||
do
|
||||
rsync -avP --delete-after --progress -e "ssh" "$i" "${ip}:/var/lib/transmission/torrents/"
|
||||
status=$(( $status + $? ))
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Ready"
|
||||
if [ "$status" == 0 ]; then
|
||||
sleep 5
|
||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
||||
fi
|
||||
|
|
|
@ -1,3 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
rsync -avP --progress -e "ssh" $(find ./sf -type d -iname "*tiny*") "10.120.152.1:/var/lib/transmission/Downloads/"
|
||||
ip1="10.120.152.1"
|
||||
ip2="192.168.1.250"
|
||||
|
||||
ip r | grep 10.120.152.1
|
||||
if [[ $? == 0 ]]; then
|
||||
ping -c 1 10.120.152.1
|
||||
if [[ $? == 0 ]]; then
|
||||
ip=$ip1
|
||||
fi
|
||||
else
|
||||
ping -c 1 192.168.1.250
|
||||
if [[ $? == 0 ]]; then
|
||||
ip=$ip2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$ip" ]]; then
|
||||
echo "Sending"
|
||||
|
||||
rsync -avP --progress -e "ssh" $(find ./sf -type d -iname "*tiny*") "${ip}:/var/lib/transmission/Downloads/"
|
||||
|
||||
for i in $(find "./sf/" -name "*.torrent")
|
||||
do
|
||||
rsync -avP --delete-after --progress -e "ssh" "$i" "${ip}:/var/lib/transmission/torrents/"
|
||||
status=$(( $status + $? ))
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Ready"
|
||||
if [ "$status" == 0 ]; then
|
||||
sleep 5
|
||||
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue