File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Define the source and destination directories
4+ SOURCE_DIR=" $( git rev-parse --show-toplevel) /scripts/git_hooks"
5+ DEST_DIR=" $( git rev-parse --show-toplevel) /.git/hooks"
6+
7+ # Check if the git repository root is found
8+ if [ -z " $DEST_DIR " ]; then
9+ echo " Error: This script must be run within a git repository."
10+ exit 1
11+ fi
12+
13+ # Create the destination directory if it doesn't exist
14+ mkdir -p " $DEST_DIR "
15+
16+ # Copy the git_hooks folder to the destination
17+ cp -r " $SOURCE_DIR /" * " $DEST_DIR "
18+
19+ # Make scripts executable
20+ chmod +x " $DEST_DIR " /*
21+
22+ echo " git hooks copied in $DEST_DIR "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Define the source and destination directories
4+ SOURCE_DIR=" $( git rev-parse --show-toplevel) /scripts/vscode"
5+ DEST_DIR=" $( git rev-parse --show-toplevel) /.vscode"
6+
7+ # Check if the git repository root is found
8+ if [ -z " $DEST_DIR " ]; then
9+ echo " Error: This script must be run within a git repository."
10+ exit 1
11+ fi
12+
13+ # Create the destination directory if it doesn't exist
14+ mkdir -p " $DEST_DIR "
15+
16+ # Copy the vscode folder to the destination
17+ cp -r " $SOURCE_DIR /" * " $DEST_DIR "
18+
19+ echo " vscode config has been copied to $DEST_DIR "
Original file line number Diff line number Diff line change 1+ {
2+ "black-formatter.importStrategy" : " fromEnvironment" ,
3+ "isort.check" : true ,
4+ "isort.importStrategy" : " fromEnvironment" ,
5+ "editor.formatOnSave" : true ,
6+ "editor.codeActionsOnSave" : {
7+ "source.organizeImports" : " explicit"
8+ },
9+ "isort.args" : [
10+ " --profile" ,
11+ " black"
12+ ],
13+ }
You can’t perform that action at this time.
0 commit comments