Created
November 25, 2021 10:20
-
-
Save Diviector/9ebc9430d6bfca78ce5f933d53beda83 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 | |
if [ $# -eq 1 ] | |
then | |
if ! [ -d $1 ] | |
then | |
echo "The directory '$1' does not exist or '$1' is a file" | |
else | |
git status --porcelain | sed s/^...// | xargs -t -i cp {} $1 | |
fi | |
else | |
echo "Use: cp_git_status_output_files_to.sh <destination>" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment