Iterate over each folder.
and also update the .setup_complete bits.
This commit is contained in:
parent
a169586df5
commit
6ef0940881
2 changed files with 50 additions and 1 deletions
41
iterate.sh
Normal file
41
iterate.sh
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/zsh
|
||||
|
||||
|
||||
|
||||
# Define the absolute path to the prep script
|
||||
PREP_SCRIPT="$(cd "$(dirname "$0")" && pwd)/prep 1 font.sh"
|
||||
|
||||
# Check if the prep script exists
|
||||
if [[ ! -f "$PREP_SCRIPT" ]]; then
|
||||
echo "Prep script not found: $PREP_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure the prep script is executable
|
||||
chmod u+x "$PREP_SCRIPT"
|
||||
|
||||
# Check if the prep script is executable
|
||||
if [[ ! -x "$PREP_SCRIPT" ]]; then
|
||||
echo "Prep script not executable: $PREP_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define the absolute path to the font_files directory
|
||||
FONT_FILES_DIR="$(cd "$(dirname "$0")" && pwd)/font_files"
|
||||
|
||||
# Check if the font_files directory exists
|
||||
if [[ ! -d "$FONT_FILES_DIR" ]]; then
|
||||
echo "font_files directory not found: $FONT_FILES_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Iterate over each folder in font_files
|
||||
for folder in "$FONT_FILES_DIR"/*; do
|
||||
if [[ -d "$folder" ]]; then
|
||||
cd "$folder" || continue
|
||||
zsh "$PREP_SCRIPT"
|
||||
cd ..
|
||||
else
|
||||
echo "No such directory: $folder"
|
||||
fi
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue