-
-
Save karasugawasu/e37e41812fa073872faa767b915dbd4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# CSSファイルが存在するディレクトリ | |
REPO_DIR="/home/$USER/hanubeki-lemmy-themes" | |
DIR="$REPO_DIR/5/dist" | |
SCRIPT_DIR="$REPO_DIR/piefed" | |
DIST_DIR="/home/$USER/pyfedi/app/templates/themes" | |
cd "$REPO_DIR" && git pull | |
#mkdir -p "$DIST_DIR" | |
# ディレクトリ内のすべてのCSSファイルをループ | |
for file in "$DIR"/*.css; do | |
# ファイル名から拡張子を除いた部分を取得 | |
filename=$(basename "$file" .css) | |
# ファイル名と同じ名前のディレクトリを作成 | |
mkdir -p "$DIST_DIR/$filename" | |
# CSSファイルを作成したディレクトリに移動 | |
cp "$file" "$DIST_DIR/$filename/styles.css" | |
cp "$SCRIPT_DIR/scripts.js" "$DIST_DIR/$filename/" | |
echo -e "{\n \"name\": \"$filename\"\n}" > "$DIST_DIR/$filename/$filename.json" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment