improve mirroring functionality
This commit is contained in:
86
Makefile
86
Makefile
@ -380,89 +380,7 @@ docker: clean xhost
|
||||
TORRENT?=false
|
||||
|
||||
all-torrents:
|
||||
bash -c "export TBLANG=ro && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=ru && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=tr && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=en-US && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=ga-IE && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=pt-BR && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=es-ES && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=fa && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=it && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=ja && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=ka && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=ar && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=ca && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=da && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=my && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=th && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=de && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=hu && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=lt && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=he && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=ms && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=pl && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=zh-TW && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=id && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=ko && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=nl && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=zh-CN && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=el && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=fr && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=sv-SE && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=cs && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=es-AR && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=nb-NO && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=is && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=mk && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TBLANG=vi && \
|
||||
make torrents-\$$TBLANG"
|
||||
bash -c "export TORRENT=true && export TBLANG=vi && \
|
||||
make torrents-\$$TBLANG"
|
||||
cd ../torbrowser && ./copy.sh
|
||||
cd ../torbrowser && ./add.sh
|
||||
|
||||
torrents-$(TBLANG):
|
||||
TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false ./i2p.plugins.tor-manager -nounpack -notor -os win -lang "$(TBLANG)" -p2p=false
|
||||
TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false ./i2p.plugins.tor-manager -nounpack -notor -os osx -lang "$(TBLANG)" -p2p=false
|
||||
TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false ./i2p.plugins.tor-manager -nounpack -notor -os linux -lang "$(TBLANG)" -p2p=false
|
||||
TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false ./i2p.plugins.tor-manager -nounpack -notor -os win -arch 32 -lang "$(TBLANG)" -p2p=false
|
||||
TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false ./i2p.plugins.tor-manager -nounpack -notor -os linux -arch 32 -lang "$(TBLANG)" -p2p=false
|
||||
touch torrents-$(TBLANG)
|
||||
go build
|
||||
TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false TOR_MANAGER_NEVER_USE_TOR=true ./i2p.plugins.tor-manager -notor -mirrorall
|
||||
|
||||
distclean: clean
|
6
main.go
6
main.go
@ -230,7 +230,11 @@ func main() {
|
||||
}
|
||||
}
|
||||
if *mirrorall {
|
||||
err := mirrorAll()
|
||||
err := os.Setenv("TOR_MANAGER_NEVER_USE_TOR", "true")
|
||||
if err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
err = mirrorAll()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
@ -65,5 +65,10 @@ func mirrorPlatform(path, ietf, platform, arch string) error {
|
||||
cmd.Env = os.Environ()
|
||||
cmd.Env = append(cmd.Env, "TOR_MANAGER_CLEARNET_MIRROR=true")
|
||||
cmd.Env = append(cmd.Env, "TOR_MANAGER_REQUIRE_PASSWORD=false")
|
||||
return cmd.Run()
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Println(string(output))
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user