|
@@ -195,6 +195,16 @@ function work_out_debs() {
|
|
|
mylog "02-important@deps@without@required.txt2" "$(echo ${important_deps} | xargs | tr ' ' '\n')"
|
|
|
}
|
|
|
|
|
|
+function download_debs() {
|
|
|
+ ALL_PKGS="$*"
|
|
|
+ MIRROR=${MIRRORS%% *}
|
|
|
+ for p in ${ALL_PKGS}; do
|
|
|
+ filename="${MIRROR}/$(analysis.sh --repo ${TARGET_DIR}/172.29.220.242/mirror/kylin/dists --pkg $p | grep '^Filename: ' | awk '{print $2}')"
|
|
|
+ echo "$p $filename"
|
|
|
+ wgetfile $filename
|
|
|
+ done | column -t >${TARGET_DIR}/deb.list
|
|
|
+}
|
|
|
+
|
|
|
TARGET_DIR="/var/tmp/indices"
|
|
|
if [ ! -d "${TARGET_DIR}" ]; then
|
|
|
mkdir -p "${TARGET_DIR}"
|
|
@@ -204,10 +214,11 @@ SHELL_DIR=$(dirname $(readlink -f $0))
|
|
|
# config_ubuntu
|
|
|
# config_kylin
|
|
|
config_my
|
|
|
-download_indices
|
|
|
-work_out_debs
|
|
|
|
|
|
+# download_indices
|
|
|
+
|
|
|
+work_out_debs
|
|
|
all_debs=$(echo "${required_deps} ${important_deps}" | xargs | tr ' ' '\n' | sort | uniq)
|
|
|
-echo "${all_debs}"
|
|
|
+# echo "${all_debs}"
|
|
|
|
|
|
-# TODO: download_deb
|
|
|
+download_debs "${all_debs}"
|