#!/bin/bash

# delete the old script
rm allscripts.js
rm allscriptscompressed.js

#cat ./app/controllers/picture-assistant.js >> allscripts.js
#cat ./app/controllers/search-assistant.js >> allscripts.js
#cat ./app/controllers/browse-assistant.js >> allscripts.js
#cat ./app/controllers/details-assistant.js >> allscripts.js
#cat ./app/controllers/comments-assistant.js >> allscripts.js
#cat ./app/controllers/add-comment-assistant.js >> allscripts.js
#cat ./app/controllers/tagcloud-assistant.js >> allscripts.js
#cat ./app/controllers/inappropriate-assistant.js >> allscripts.js
#cat ./app/controllers/myapps-assistant.js >> allscripts.js
#cat ./app/controllers/error-assistant.js >> allscripts.js
#cat ./app/controllers/incompatible-assistant.js >> allscripts.js
#cat ./app/controllers/prefs-assistant.js >> allscripts.js
#cat ./app/controllers/create-account-assistant.js >> allscripts.js
#cat ./app/controllers/payment-setup-assistant.js >> allscripts.js
#cat ./app/controllers/account-profile-assistant.js >> allscripts.js
#cat ./app/controllers/terms-assistant.js >> allscripts.js
#cat ./app/controllers/change-email-address-assistant.js >> allscripts.js

cat ./app/controllers/app-assistant.js >> allscripts.js
cat ./app/controllers/main-assistant.js >> allscripts.js
cat ./app/controllers/password-assistant.js >> allscripts.js
cat ./app/controllers/forgot-password-assistant.js >> allscripts.js
cat ./app/controllers/reset-password-assistant.js >> allscripts.js
cat ./app/controllers/reset-email-assistant.js >> allscripts.js

cat ./app/model/profile-model.js >> allscripts.js
cat ./app/model/preferences.js >> allscripts.js
cat ./app/model/termsofuse.js >> allscripts.js

cat ./app/utilities/spinner.js >> allscripts.js
cat ./app/utilities/errors.js >> allscripts.js
cat ./app/utilities/utcdate.js >> allscripts.js
cat ./app/utilities/versioncheck.js >> allscripts.js
cat ./app/utilities/lazyloadimage.js >> allscripts.js
cat ./app/utilities/common.js >> allscripts.js

cat ./weave/weave.js >> allscripts.js

cat ./weave/system/activator.js >> allscripts.js

cat ./weave/services/services.js >> allscripts.js
cat ./weave/services/accountservices.js >> allscripts.js
cat ./weave/services/applicationinstaller.js >> allscripts.js
cat ./weave/services/applicationmanager.js >> allscripts.js
cat ./weave/services/catalogserver.js >> allscripts.js
cat ./weave/services/applicationserver.js >> allscripts.js
cat ./weave/services/browser.js >> allscripts.js
cat ./weave/services/connectionmanager.js >> allscripts.js
cat ./weave/services/deviceprofile.js >> allscripts.js
cat ./weave/services/appinstallservice.js >> allscripts.js
cat ./weave/services/systemmanager.js >> allscripts.js
cat ./weave/services/systemproperties.js >> allscripts.js
cat ./weave/services/paymentserver.js >> allscripts.js

cat ./weave/utilities/regexp.js >> allscripts.js
cat ./weave/utilities/appmenu.js >> allscripts.js

cat ./weave/download/downloadstates.js >> allscripts.js
cat ./weave/download/appdetails.js >> allscripts.js
cat ./weave/download/appdownload.js >> allscripts.js
cat ./weave/download/appdownloadmanager.js >> allscripts.js

# now compress allscripts.js
java -jar /home/mjain/Desktop/YUI/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar -o /home/mjain/workspace1.2/com.palm.app.findapps/allscriptscompressed.js /home/mjain/workspace1.2/com.palm.app.findapps/allscripts.js
