Last active
June 20, 2023 06:05
-
-
Save bl4ckb0ne/3a79934492114eb812956dd4ec2bbc7e to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
# Program to use the command install recursivly in a folder | |
magic_func() { | |
echo "entering ${1}" | |
echo "target $2" | |
for file in $1; do | |
if [ -f "$file" ]; then | |
echo "file : $file" | |
echo "installing into $2/$file" | |
install -D $file $2/$file | |
elif [ -d "$file" ]; then | |
echo "directory : $file" | |
magic_func "$file/*" "$2" | |
else | |
echo "not recognized : $file" | |
fi | |
done | |
} | |
magic_func "$1" "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment