Created
March 19, 2024 16:28
-
-
Save sblack4/58deea171eb990cede78a97d95addc2b 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
# looops through subdirs | |
# look for file or symlink named Makeifle | |
# creates a new one | |
for folder in $(echo *); do | |
if [ -d $folder ]; then | |
cd $folder | |
# test for file | |
if [ -f "Makefile" ] | |
then | |
echo $folder | |
rm Makefile | |
echo "include ../Makefile" > Makefile | |
echo >> Makefile | |
fi | |
# test for symlink | |
if [ -L "Makefile" ] | |
then | |
echo $folder | |
rm Makefile | |
echo "include ../Makefile" > Makefile | |
echo >> Makefile | |
fi | |
cd .. | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment