pub / selfoss-tweaks

Tweaks for the selfoss RSS reader
git clone src.jayvii.de/pub/selfoss-tweaks.git
Home | Log | Files | Exports | Refs | RSS

Makefile (2071B)


      1 all:
      2 	make minify-css
      3 	make user-css
      4 
      5 minify-css:
      6 	cat css/mobile.css | \
      7 		sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | \
      8 		tr -d '\t' | \
      9 		tr -d '\n' | \
     10 		tr -s ' ' ' ' | \
     11 		sed -E \
     12 			-e 's/\s*;\s*/;/g' \
     13 			-e 's/\s*:\s*/:/g' \
     14 			-e 's/\s*\{\s*/{/g' \
     15 			-e 's/\s*\}\s*/}/g' \
     16 			-e 's/\s*,\s*/,/g' \
     17 			-e 's/\s*>\s*/>/g' \
     18 			-e 's/\s*<\s*/</g' | \
     19 		tee css/mobile.min.css > /dev/null
     20 	cat css/desktop.css | \
     21 		sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | \
     22 		tr -d '\t' | \
     23 		tr -d '\n' | \
     24 		tr -s ' ' ' ' | \
     25 		sed -E \
     26 			-e 's/\s*;\s*/;/g' \
     27 			-e 's/\s*:\s*/:/g' \
     28 			-e 's/\s*\{\s*/{/g' \
     29 			-e 's/\s*\}\s*/}/g' \
     30 			-e 's/\s*,\s*/,/g' \
     31 			-e 's/\s*>\s*/>/g' \
     32 			-e 's/\s*<\s*/</g' | \
     33 		tee css/desktop.min.css > /dev/null
     34 	cat css/dark.css | \
     35 		sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | \
     36 		tr -d '\t' | \
     37 		tr -d '\n' | \
     38 		tr -s ' ' ' ' | \
     39 		sed -E \
     40 			-e 's/\s*;\s*/;/g' \
     41 			-e 's/\s*:\s*/:/g' \
     42 			-e 's/\s*\{\s*/{/g' \
     43 			-e 's/\s*\}\s*/}/g' \
     44 			-e 's/\s*,\s*/,/g' \
     45 			-e 's/\s*>\s*/>/g' \
     46 			-e 's/\s*<\s*/</g' | \
     47 		tee css/dark.min.css > /dev/null
     48 	cat css/dark_injection.css | \
     49 		sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | \
     50 		tr -d '\t' | \
     51 		tr -d '\n' | \
     52 		tr -s ' ' ' ' | \
     53 		sed -E \
     54 			-e 's/\s*;\s*/;/g' \
     55 			-e 's/\s*:\s*/:/g' \
     56 			-e 's/\s*\{\s*/{/g' \
     57 			-e 's/\s*\}\s*/}/g' \
     58 			-e 's/\s*,\s*/,/g' \
     59 			-e 's/\s*>\s*/>/g' \
     60 			-e 's/\s*<\s*/</g' | \
     61 		tee css/dark_injection.min.css > /dev/null
     62 
     63 user-css:
     64 	printf "/* selfoss-tweaks all-in-one user style sheet */\n" | \
     65 		tee css/user.css > /dev/null
     66 	printf "\n/* Mobile Rules */\n" | tee --append css/user.css > /dev/null
     67 	cat css/mobile.min.css | tee --append css/user.css > /dev/null
     68 	printf "\n/* Desktop Rules */\n" | tee --append css/user.css > /dev/null
     69 	cat css/desktop.min.css | tee --append css/user.css > /dev/null
     70 	printf "\n/* Dark Mode Rules */\n" | tee --append css/user.css > /dev/null
     71 	cat css/dark.min.css | tee --append css/user.css > /dev/null
     72 	printf "\n" | tee --append css/user.css > /dev/null
     73