Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / build / bin / docs.sh
1 source build/bin/config.sh
2
3 mkdir -p tmp/demos/js
4 mkdir -p tmp/demos/css/themes/$THEME
5 # ... Copy script files
6 cp compiled/*.js tmp/demos/js
7 cp js/jquery.js tmp/demos/js
8 # ... Copy html files
9 cp index.html tmp/demos
10 cp -r docs tmp/demos
11 # ... Copy css and images
12 cp compiled/*.css tmp/demos/css/themes/$THEME
13 cp -r compiled/images tmp/demos/css/themes/$THEME
14 # ... replace "js/" with "js/jquery.mobile.js"
15 # NOTE the deletion here is required by gnu/bsd sed differences
16 find tmp/demos \( -name '*.html' -o -name '*.php' \) -exec sed -i${SED_INPLACE_EXT} -e "s@js/\"@js/$NAME.js\"@" {} \;
17 find tmp/demos -name "*$SED_INPLACE_EXT" -exec rm {} \;
18 # make sure the docs reference the right css file names (for deploy)
19 find tmp/demos \( -name '*.html' -o -name '*.php' \) -exec sed -i${SED_INPLACE_EXT} -e "s@$BASE_NAME.css\"@$NAME.css\"@" {} \;
20 find tmp/demos -name "*$SED_INPLACE_EXT" -exec rm {} \;
21
22 # clear out old zip files
23 clear_zip_files $OUTPUT
24
25 # create the docs zip in the output directory using the demo files
26 cd tmp/demos && zip -rq ../../$OUTPUT/$NAME.docs.zip * && cd -
27
28 # clean out the compiled directory demos and cp the new output
29 rm -rf $OUTPUT/demos && mv -f tmp/demos $OUTPUT
30
31 # Finish by removing the temporary files
32 rm -rf tmp