Last active
March 29, 2021 21:00
-
-
Save joshbooks/9a1e33a5e8e82874150b0074959271ef to your computer and use it in GitHub Desktop.
create new kotlin file corresponding to existing java path
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 | |
javaPath=$1 | |
kotlinPath=`echo "$javaPath" | sed 's|/java/|/kotlin/|' | sed 's|\.java|.kt|'` | |
echo "creating $kotlinPath" | |
parentDir=`echo "$kotlinPath" | sed 's|[^/]*$||'` | |
mkdir -p $parentDir | |
touch $kotlinPath |
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 | |
javaPath=$1 | |
kotlinPath=`echo "$javaPath" | sed 's|/java/|/kotlin/|' | sed 's|\.java|.kt|'` | |
echo "creating $kotlinPath" | |
parentDir=`echo "$kotlinPath" | sed 's|[^/]*$||'` | |
mkdir -p $parentDir | |
mv $javaPath $kotlinPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment