Projects
Kolab:3.4
roundcubemail
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 37
View file
roundcubemail.spec
Changed
@@ -1628,15 +1628,15 @@ orig_dir="%{name}-%{version}" asset_dir="%{name}-assets-%{version}$(echo ${asset_path} | %{__sed} -e 's|%{buildroot}%{datadir}||g')" -# Remove the skins and installer directories from $orig_dir -%{__rm} -rf $orig_dir/{installer,skins} +# Remove the skins and installer directories from ${orig_dir} +%{__rm} -rf ${orig_dir}/{installer,skins} -echo "Original directory for core: $orig_dir" +echo "Original directory for core: ${orig_dir}" echo "Asset directory for core: $asset_dir" # Compress the CSS -for file in `find $orig_dir -type f -name "*.css" | grep -vE "/(plugins|skins)/"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) +for file in `find ${orig_dir} -type f -name "*.css" | grep -vE "${orig_dir}/(plugins|skins)/"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} cat ${file} | %{_bindir}/python-cssmin > ${asset_loc}/$(basename ${file}) && \ %{__rm} -rf ${file} || \ @@ -1644,23 +1644,23 @@ done # Compress the JS, but not the already minified -for file in `find $orig_dir -type f -name "*.js" ! -name "*.min.js" | grep -vE "/(plugins|skins)/"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) +for file in `find ${orig_dir} -type f -name "*.js" ! -name "*.min.js" | grep -vE "${orig_dir}/(plugins|skins)/"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} -# uglifyjs ${file} > ${asset_loc}/$(basename ${file}) && \ -# %{__rm} -rf ${file} || \ + uglifyjs ${file} > ${asset_loc}/$(basename ${file}) && \ + %{__rm} -rf ${file} || \ %{__mv} -v ${file} ${asset_loc}/$(basename ${file}) done # The already minified JS can just be copied over to the assets location -for file in `find $orig_dir -type f -name "*.min.js" | grep -vE "/(plugins|skins)/"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) +for file in `find ${orig_dir} -type f -name "*.min.js" | grep -vE "${orig_dir}/(plugins|skins)/"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} %{__mv} -v ${file} ${asset_loc}/$(basename ${file}) done # Other assets -for file in $(find $orig_dir -type f \ +for file in $(find ${orig_dir} -type f \ -name "*.eot" -o \ -name "*.gif" -o \ -name "*.ico" -o \ @@ -1671,9 +1671,9 @@ -name "*.tif" -o \ -name "*.ttf" -o \ -name "*.woff" | \ - grep -vE "/(plugins|skins)/" + grep -vE "${orig_dir}/(plugins|skins)/" ); do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} %{__mv} -vf ${file} ${asset_loc}/$(basename $file) done @@ -1708,12 +1708,12 @@ orig_dir="%{name}-skin-$skin-%{version}" asset_dir="%{name}-skin-$skin-assets-%{version}$(echo ${asset_path} | %{__sed} -e 's|%{buildroot}%{datadir}||g')" - echo "Original directory for the $skin skin: $orig_dir" + echo "Original directory for the $skin skin: ${orig_dir}" echo "Asset directory for the $skin skin: $asset_dir" # Compress the CSS - for file in `find $orig_dir -type f -name "*.css"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.css"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} cat ${file} | %{_bindir}/python-cssmin > ${asset_loc}/$(basename ${file}) && \ %{__rm} -rf ${file} || \ @@ -1721,23 +1721,23 @@ done # Compress the JS, but not the already minified - for file in `find $orig_dir -type f -name "*.js" ! -name "*.min.js"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.js" ! -name "*.min.js"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} -# uglifyjs ${file} > ${asset_loc}/$(basename ${file}) && \ -# %{__rm} -rf ${file} || \ + uglifyjs ${file} > ${asset_loc}/$(basename ${file}) && \ + %{__rm} -rf ${file} || \ %{__mv} -v ${file} ${asset_loc}/$(basename ${file}) done # The already minified JS can just be copied over to the assets location - for file in `find $orig_dir -type f -name "*.min.js"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.min.js"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} %{__mv} -v ${file} ${asset_loc}/$(basename ${file}) done # Other assets - for file in $(find $orig_dir -type f \ + for file in $(find ${orig_dir} -type f \ -name "*.eot" -o \ -name "*.gif" -o \ -name "*.ico" -o \ @@ -1749,14 +1749,14 @@ -name "*.ttf" -o \ -name "*.woff" ); do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} %{__mv} -vf ${file} ${asset_loc}/$(basename $file) done # The watermark.html is an asset, too - if [ -f "$orig_dir/skins/$skin/watermark.html" ]; then - %{__mv} -v $orig_dir/skins/$skin/watermark.html \ + if [ -f "${orig_dir}/skins/$skin/watermark.html" ]; then + %{__mv} -v ${orig_dir}/skins/$skin/watermark.html \ $asset_dir/skins/$skin/watermark.html fi @@ -1789,15 +1789,15 @@ orig_dir="%{name}-plugin-$plugin-skin-$skin-%{version}" # No skin, no assets - if [ ! -d "$orig_dir" ]; then + if [ ! -d "${orig_dir}" ]; then continue fi asset_dir="%{name}-plugin-$plugin-skin-$skin-assets-%{version}" # Compress the CSS - for file in `find $orig_dir -type f -name "*.css"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.css"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} cat ${file} | %{_bindir}/python-cssmin > ${asset_loc}/$(basename ${file}) && \ %{__rm} -rf ${file} || \ @@ -1805,23 +1805,23 @@ done # Compress the JS, but not the already minified - for file in `find $orig_dir -type f -name "*.js" ! -name "*.min.js"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.js" ! -name "*.min.js"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} -# uglifyjs ${file} > ${asset_loc}/$(basename ${file}) && \ -# %{__rm} -rf ${file} || \ + uglifyjs ${file} > ${asset_loc}/$(basename ${file}) && \ + %{__rm} -rf ${file} || \ %{__mv} -v ${file} ${asset_loc}/$(basename ${file}) done # The already minified JS can just be copied over to the assets location - for file in `find $orig_dir -type f -name "*.min.js"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.min.js"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} %{__mv} -v ${file} ${asset_loc}/$(basename ${file}) done # Other assets - for file in $(find $orig_dir -type f \ + for file in $(find ${orig_dir} -type f \ -name "*.eot" -o \ -name "*.gif" -o \ -name "*.ico" -o \ @@ -1833,13 +1833,13 @@ -name "*.ttf" -o \ -name "*.woff" ); do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} %{__mv} -vf ${file} ${asset_loc}/$(basename $file) done # Purge empty directories - find $orig_dir -type d -empty -delete + find ${orig_dir} -type d -empty -delete done %{__mkdir_p} %{buildroot}%{plugindir} @@ -1863,8 +1863,8 @@ asset_dir="%{name}-plugin-$plugin-assets-%{version}" # Compress the CSS - for file in `find $orig_dir -type f -name "*.css"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.css"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} cat ${file} | %{_bindir}/python-cssmin > ${asset_loc}/$(basename ${file}) && \ %{__rm} -rf ${file} || \ @@ -1872,23 +1872,23 @@ done # Compress the JS, but not the already minified - for file in `find $orig_dir -type f -name "*.js" ! -name "*.min.js"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.js" ! -name "*.min.js"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} -# uglifyjs ${file} > ${asset_loc}/$(basename ${file}) && \ -# %{__rm} -rf ${file} || \ + uglifyjs ${file} > ${asset_loc}/$(basename ${file}) && \ + %{__rm} -rf ${file} || \ %{__mv} -v ${file} ${asset_loc}/$(basename ${file}) done # The already minified JS can just be copied over to the assets location - for file in `find $orig_dir -type f -name "*.min.js"`; do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + for file in `find ${orig_dir} -type f -name "*.min.js"`; do + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} %{__mv} -v ${file} ${asset_loc}/$(basename ${file}) done # Other assets - for file in $(find $orig_dir -type f \ + for file in $(find ${orig_dir} -type f \ -name "*.eot" -o \ -name "*.gif" -o \ -name "*.ico" -o \ @@ -1900,13 +1900,13 @@ -name "*.ttf" -o \ -name "*.woff" ); do - asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|$orig_dir|$asset_dir|g")) + asset_loc=$(dirname $(echo ${file} | %{__sed} -e "s|${orig_dir}|$asset_dir|g")) %{__mkdir_p} ${asset_loc} %{__mv} -vf ${file} ${asset_loc}/$(basename $file) done # Purge empty directories - find $orig_dir -type d -empty -delete + find ${orig_dir} -type d -empty -delete if [ ! -d $asset_dir ]; then touch plugin-$plugin-assets.files
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.