-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_mirror.sh
More file actions
executable file
·69 lines (63 loc) · 1.2 KB
/
run_mirror.sh
File metadata and controls
executable file
·69 lines (63 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
#
# run_mirror.sh
###########################################################################
#
# Purpose: This script will mirror files that are defined in the package
# list that is provided as an argument.
#
# Usage:
#
# run_mirror.sh package_list
#
# where
#
# package_list is a file that contains the list of packages
# to be downloaded
#
# Env Vars: None
#
# Inputs: None
#
# Outputs: None
#
# Exit Codes:
#
# 0: Successful completion
# 1: Fatal error occurred
#
# Assumes: Nothing
#
# Implementation: See inline comments.
#
# Notes: None
#
###########################################################################
cd `dirname $0`
. ./Configuration
#
# Make sure an argument was passed to the script.
#
if [ $# -ne 1 ]
then
echo "Usage: $0 package_list"
exit 1
fi
PACKAGE_LIST=$1
#
# Make sure the package list exists.
#
if [ ! -f ${PACKAGE_LIST} ]
then
echo "Package list does not exist: ${PACKAGE_LIST}"
exit 1
fi
#
# Run the download script for each package file in the package list.
#
for i in `cat ${PACKAGE_LIST} | grep -v "^#"`
do
echo "Downloading $i"
./download_package $i
done
exit 0