-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-ack
More file actions
executable file
·27 lines (24 loc) · 745 Bytes
/
python-ack
File metadata and controls
executable file
·27 lines (24 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
#
#█▀ █▄█ █▀▀ █░█ █▀▀ █░█
#▄█ ░█░ █▄▄ █▀█ ██▄ ▀▄▀
#
#Author: <Anton Sychev> (anton at sychev dot xyz)
#python_ack.sh (c) 2024
#Created: 2024-01-04 18:13:31
#Desc: Shell script to run ack with python files only
#Documentation: to install in your system, run: ls -s </path/to/python_ack> /usr/local/bin/python-ack
#
#check if python is installed
if ! command -v python &> /dev/null
then
echo "<the_command> could not be found"
exit 1
fi
#check if python-ack is installed
if ! python -c "import python_ack" &> /dev/null; then
echo "python-ack is not installed"
python -m pip install --user python-ack
fi
#run python-ack
python -m python_ack "$@"