mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
* Erste Version des Pakfire von Peter git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@127 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
43 lines
1.0 KiB
Bash
43 lines
1.0 KiB
Bash
#!/bin/bash
|
|
############################################################################################
|
|
# Version 0.1a, Copyright (C) 2006 Peter Schaelchli Für IPFire besteht KEINERLEI GARANTIE;#
|
|
# IPFire ist freie Software, die Sie unter bestimmten Bedingungen weitergeben dürfen; #
|
|
############################################################################################
|
|
|
|
# Haupturl
|
|
http=$(get_conf.sh H_MIRROR)
|
|
|
|
# Ziel Verzeichnis
|
|
dest=$(get_conf.sh HOME)
|
|
|
|
# URL Zerleger
|
|
URL_ZERL=$(get_conf.sh URL_ZERL)
|
|
|
|
# Host Tester
|
|
HOST_TEST=$(get_conf.sh HOST_TEST)
|
|
|
|
# Testen ob Server erreichbar
|
|
if ! $HOST_TEST $($URL_ZERL $http get_host) >/dev/null 2>&1
|
|
then exit 1
|
|
fi
|
|
|
|
# Verzeichnis wechseln
|
|
cd $dest
|
|
|
|
# Überprüfen ob File schon vorhanden ist
|
|
if [ -e ${dest}$($URL_ZERL $http get_file) ]
|
|
then rm ${dest}$($URL_ZERL $http get_file)
|
|
fi
|
|
|
|
# File herunter laden
|
|
if /usr/bin/wget -q $http >/dev/null 2>&1
|
|
then
|
|
cd -
|
|
exit 0
|
|
else
|
|
cd -
|
|
exit 1
|
|
fi
|
|
|
|
################################### EOF ####################################################
|