C
citrus
Guest
Here is a linux shell-script, which installs all available sitebuildertemplates automatically.
It parses the sourcecode of the SW-Soft template-download-page and installs all available templates.
Log on your machine, where the Sitebuilder is installed.
Create a file called templateinstaller.sh and fill it with the following code:
Now do:
# chmod +x templateinstaller.sh
# ./templateinstaller.sh
It takes some minutes to finish.
After it's done you have to logon to the admininterface.
Hope that helps somebody.
citrus
It parses the sourcecode of the SW-Soft template-download-page and installs all available templates.
Log on your machine, where the Sitebuilder is installed.
Create a file called templateinstaller.sh and fill it with the following code:
Code:
!#/bin/sh
# This works only on Debian!
touch source.txt
> source.txt
rm -rf index.html
wget http://www.swsoft.com/en/download/sitebuilder2/templates/
echo "Start downlading templates..."
cat index.html | grep zip | awk '{ print $2 }' > source.txt
sed -i 's/href="//g' source.txt
sed -i 's/">ZIP//g' source.txt
mkdir tpl_zip
for DOWNLOAD in `cat source.txt`
do
echo ""
wget $DOWNLOAD -P ./tpl_zip
done
echo "Downloading finished..."
# Installing Themes
cd tpl_zip
ls *.zip > files.txt
sed -i 's/.zip//g' files.txt
mkdir files
for FILE in `cat files.txt`
do
unzip "$FILE".zip -d ./files/$FILE
done
cd files
for DIR in `cat ../files.txt`
do
cd $DIR
mv *.zip ../
cd ../
done
ls *.zip > templatelist.txt
sed -i 's/.zip//g' templatelist.txt
for TEMPLATE in `cat templatelist.txt`
do
unzip "$TEMPLATE".zip -d /usr/local/sitebuilder/htdocs/repository/templates/$TEMPLATE
done
cd ../
cd ../
chown -R www-data:www-data /usr/local/sitebuilder/htdocs/repository/templates/*
# use apache:apache on Redhat Systems, or nobody:nobody on a cPanel machine (but my experiences on a cPanel system weren't good).
ls /usr/local/sitebuilder/htdocs/repository/templates/ > /usr/local/sitebuilder/htdocs/repository/templates/tmpl_inst
echo "Install complete!"
echo "you can delete the folder tpl_zip"
exit 0
Now do:
# chmod +x templateinstaller.sh
# ./templateinstaller.sh
It takes some minutes to finish.
After it's done you have to logon to the admininterface.
Hope that helps somebody.
citrus