marseymoji/marsey/marsey_replacer.sh

22 lines
500 B
Bash
Raw Normal View History

2023-07-15 19:36:07 +00:00
#!/bin/bash
REPLACER_RESOLUTION="128"
#!/bin/bash
# Read the marseys.conf file line by line
while IFS='=' read -r key value; do
# Skip lines starting with #
if [[ $key == \#* ]]; then
continue
fi
# Extract the filenames and paths
original_file="png/$REPLACER_RESOLUTION/$value"
replacement_file="marsey/marseys/$key.png"
# Perform the replacement
echo "Copying $replacement_file to $original_file ..."
cp -f "$replacement_file" "$original_file"
done < marsey/marseys.conf