add scripts for treewide mainProgram
This commit is contained in:
15
treewideMainProgram/ed_main_program.sh
Executable file
15
treewideMainProgram/ed_main_program.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PACKAGE_PATH=$1
|
||||
PACKAGE_NAME=$1
|
||||
|
||||
if [ -f $1 ]; then
|
||||
PACKAGE_NAME=$(dirname $PACKAGE_NAME)
|
||||
else
|
||||
PACKAGE_PATH="${PACKAGE_PATH%%/}/default.nix"
|
||||
fi
|
||||
|
||||
PACKAGE_NAME="${PACKAGE_NAME%/}"
|
||||
PACKAGE_NAME="${PACKAGE_NAME##*/}"
|
||||
|
||||
NVIM_CLIPBOARD="mainProgram = \"$PACKAGE_NAME\";" nvim $PACKAGE_PATH
|
||||
Reference in New Issue
Block a user