Created
December 16, 2017 05:50
-
-
Save rbalicki2/4cc3a27ae099a39eef1555bac27ea508 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
replacejs() { | |
FOLDER_NAME=$(basename $1 | sed 's/\.js\(x\)\{0,1\}$//') | |
FOLDER=$(dirname $1)/$FOLDER_NAME | |
SUFFIX=$(basename $1 | sed 's/.*\.//') | |
mkdir $FOLDER | |
mv $1 $FOLDER/index.$SUFFIX | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment