diff --git a/webbuild/html/scripts/webbuild.js b/webbuild/html/scripts/webbuild.js
index 2f66833..b809f78 100644
--- a/webbuild/html/scripts/webbuild.js
+++ b/webbuild/html/scripts/webbuild.js
@@ -31,6 +31,41 @@ function checkEnter(event) {
return false;
}
+function suggestSpecName(url) {
+ var url=document.getElementById("speccreateurl").value;
+ if (url.indexOf('&') > 0) url=url.substring(0,url.indexOf('&')+1);
+ var filename=url.substring(url.lastIndexOf('/')+1);
+ if (filename.indexOf('.') > 0) filename=filename.substring(0,filename.indexOf('.'));
+ if (filename.lastIndexOf('-') > 0) {
+ var version=filename.substring(filename.lastIndexOf('-')+1);
+ filename=filename.substring(0,filename.lastIndexOf('-')).toLowerCase();
+ }
+ document.getElementById("speccreateurl").value=url;
+ document.getElementById("speccreatename").value=filename;
+ document.getElementById("speccreateversion").value=version;
+ if (filename) {
+ document.getElementById("speccreatebutton").disabled=false;
+ } else {
+ document.getElementById("speccreatebutton").disabled=true;
+ }
+ if (filename.search("perl-") >= 0) {
+ for (var j=0;j= 0) {
+ for (var j=0;j"
echo -n ""
- $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "ls *.spec | sort -f" | while read f; do
+ $SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "ls *.spec | sed \"s|.spec$||\" | sort -f" | while read f; do
specname=${f/.spec}
[ "$PACKAGE" = "$specname" ] && SELECTED="selected=\"selected\"" || SELECTED=
- echo -n ""
+ echo -n ""
done
- echo -n "]]>"
+ echo -n ".spec]]>"
fi
[ "$PACKAGE" -a ! "$REQUEST" ] && REQUEST=edit
@@ -695,7 +695,9 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
#(getElementById('package').selectedIndex);>"
echo ""
SRPMBUTTONDISABLED="disabled=disabled"
- ls $local_ftp/$REPOSITORY/SRPMS.base/*.src.rpm | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY
+ if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY ]; then
+ ls $local_ftp/$REPOSITORY/SRPMS.base/*.src.rpm | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY
+ fi
while read f; do
[ -r $f ] || continue
pkgname=`basename $f`
@@ -740,17 +742,17 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
# SPECFILE creation
if [ ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" -a "$MAINTAINERMODE" != "true" ]; then
echo -n ""
- echo -n " Start from URL:"
+ echo -n " Start from URL:"
echo -n " name:"
echo -n " type:"
echo -n " version:"
echo -n " branch:"
- echo -n "