Skip to content

Commit

Permalink
make this work again, some licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
Miłosz Thiede committed Feb 11, 2024
1 parent be29aa9 commit ec55600
Showing 1 changed file with 29 additions and 21 deletions.
50 changes: 29 additions & 21 deletions minify.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
#!/bin/bash
# /* Some CSS: https://github.com/MajliTech/some-css */
# /* Copyright (C) 2024 MajliTech */
# /* */
# /* This program is free software: you can redistribute it and/or modify */
# /* it under the terms of the GNU General Public License as published by */
# /* the Free Software Foundation, either version 3 of the License, or */
# /* (at your option) any later version. */
# /* This program is distributed in the hope that it will be useful, */
# /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
# /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
# /* GNU General Public License for more details. */
# /* You should have received a copy of the GNU General Public License */
# /* along with this program. If not, see <https://www.gnu.org/licenses/>.*/


mkdir -p min-css
for file in css/*.css; do
filename=$(basename "$file" .css)
minified_css = "/* Some CSS: https://github.com/MajliTech/some-css */
# Some CSS: https://github.com/MajliTech/some-css #
# Copyright (C) 2024 MajliTech #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>.#
license_header=$(
cat <<- "EOF"
/* Some CSS: https://github.com/MajliTech/some-css */
/* Copyright (C) 2024 MajliTech */
/* */
/* This program is free software: you can redistribute it and/or modify */
Expand All @@ -29,7 +26,18 @@ for file in css/*.css; do
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <https://www.gnu.org/licenses/>.*/\n\n$(minify $file)"
echo -n $minified_css > min-css/$filename.min.css
/* along with this program. If not, see <https://www.gnu.org/licenses/>.*/
EOF
)
echo "some-css minify Copyright (C) 2024 MajliTech
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions;
check the LICENSE file or https://www.gnu.org/licenses/
"
mkdir -p min-css
for file in css/*.css; do
filename=$(basename "$file" .css)
minified_css="\n\n$(minify $file)"
printf "$license_header$minified_css" > min-css/$filename.min.css
echo "MINIFIED: '$file' > 'min-css/$filename.min.css'"
done

0 comments on commit ec55600

Please sign in to comment.