diff --git a/scripts/build-dev.sh b/scripts/build-dev.sh new file mode 100755 index 0000000..82391a0 --- /dev/null +++ b/scripts/build-dev.sh @@ -0,0 +1,11 @@ +original_name=thefug +new_name=thefugbindev + +cargo build + +mv target/debug/$original_name target/debug/$new_name + +echo "Dev build complete!" +echo "Set an alias to $(pwd)/target/debug/$new_name named $new_name to use it with the generated thefug script" +echo +echo "Example: alias $new_name='$(pwd)/target/debug/$new_name'" diff --git a/src/init.rs b/src/init.rs index e7c7cf3..fd42772 100644 --- a/src/init.rs +++ b/src/init.rs @@ -50,7 +50,7 @@ impl Init { " #!/bin/bash -command=$(cargo run) +command=$(thefugbindev) if [ \"$command\" = \"No fugs given.\" ]; then echo \"$command\" @@ -67,7 +67,7 @@ fi " #!/bin/fish -set command (cargo run) +set command (thefugbindev) if \"$command\" = \"No fugs given.\" echo \"$command\" @@ -84,7 +84,7 @@ end " #!/bin/zsh -command=$(cargo run) +command=$(thefugbindev) if [ \"$command\" = \"No fugs given.\" ]; then echo \"$command\"