aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts/rust_template.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/.scripts/rust_template.sh')
-rwxr-xr-xscripts/.scripts/rust_template.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/.scripts/rust_template.sh b/scripts/.scripts/rust_template.sh
new file mode 100755
index 0000000..f4ab224
--- /dev/null
+++ b/scripts/.scripts/rust_template.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+echo -e "sure? y)es n)o d)on't open the file"
+read input
+if [ "$input" = "y" ]; then
+ mkdir "$1"
+ cd "$1" || exit
+ cp ~/programming/rust-template/main.rs .
+ cp ~/programming/rust-template/rust-project.json .
+ nvim main.rs
+fi
+if [ "$input" = "d" ]; then
+ mkdir "$1"
+ cp ~/programming/rust-template/main.rs "$1"
+ cp ~/programming/rust-template/rust-project.json .
+fi