4c0b4b subr/check_updates.subr: preliminary support for lynx and pacman.

Authored and Committed by Lucio Andrés Illanes Albornoz (arab, vxp) 8 years ago
    subr/check_updates.subr: preliminary support for lynx and pacman.
    
        
file modified
+35 -0
vars/check_updates.vars CHANGED
@@ -76,6 +76,25 @@ pkg_libgpg_error_check_updates() {
76
76
esac;
77
77
};
78
78
79
+ pkg_lynx_check_updates() {
80
+ case "${1}" in
81
+ get_fnames)
82
+ cu_fname="${cu_url##*/}";
83
+ cu_fname_base="lynx";
84
+ cu_fname_ext="${cu_fname#${cu_fname_base}${cu_version}.}";
85
+ ;;
86
+ get_version)
87
+ if [ "${cu_fname#${cu_fname_base}-cur}" = "${cu_fname}" ]\
88
+ && [ "${cu_fname#*rel\.}" != "${cu_fname}" ]\
89
+ && [ "${cu_fname#${cu_fname_base}}" != "${cu_fname}" ]\
90
+ && [ "${cu_fname%.${cu_fname_ext}}" != "${cu_fname}" ]; then
91
+ cu_fname_version="${cu_fname%.${cu_fname_ext}}";
92
+ cu_fname_version="${cu_fname_version#lynx}";
93
+ fi;
94
+ ;;
95
+ esac;
96
+ };
97
+
79
98
pkg_libpthread_stubs_check_updates() {
80
99
case "${1}" in
81
100
get_fnames)
@@ -99,6 +118,22 @@ pkg_mksh_check_updates() {
99
118
esac;
100
119
};
101
120
121
+ pkg_pacman_check_updates() {
122
+ case "${1}" in
123
+ get_fnames)
124
+ cu_fname="${cu_url##*/}";
125
+ cu_fname_base="pacman";
126
+ cu_fname_ext="${cu_fname#${cu_fname_base}-${cu_version}.}";
127
+ cu_url_index="https://git.archlinux.org/pacman.git/";
128
+ cu_fnames="$(wget ${WGET_ARGS} -qO- "${cu_url_index}" |\
129
+ sed -n '/<a href='\''\/pacman.git\/tag\/?h=v[0-9.]\+'\''>/s/^.*<a href='\''\/pacman.git\/tag\/?h=v\([0-9.]\+\).*$/pacman-\1/p')";
130
+ ;;
131
+ get_version)
132
+ cu_fname_version="${cu_fname#pacman-}";
133
+ ;;
134
+ esac;
135
+ };
136
+
102
137
pkg_rxvt_unicode_check_updates() {
103
138
case "${1}" in
104
139
get_fnames)