Codebase list powercat / aab9757
Switch helper-script g0tmi1k 4 years ago
4 changed file(s) with 10 addition(s) and 60 deletion(s). Raw diff Collapse all Expand all
0 powercat (0.0~git20170805-0kali6) kali-dev; urgency=medium
1
2 * Switch helper-script
3
4 -- Ben Wilson <[email protected]> Mon, 10 Jun 2019 14:27:18 +0100
5
06 powercat (0.0~git20170805-0kali5) kali-dev; urgency=medium
17
28 * Fix typos in helper-script
+0
-59
debian/helper-script/powercat less more
0 #!/bin/bash
1
2 ## Generate: awk -F ': ' '/^Description: / {print $2}' debian/control
3 description="netshell features all in version 2 powershell"
4 package="powercat"
5 location="/usr/share/windows-resources/${package}"
6
7
8 ## Define command line arguments
9 banner="true"
10 output="true"
11
12
13 ## Read command line arguments
14 while [[ $# -gt 0 ]]; do
15 opt="$1";
16 shift;
17 case "$opt" in
18 #"-h")
19 # banner="true" ;;
20 #"-v")
21 # output="true" ;;
22 "-q")
23 banner="false";
24 output="false";;
25 "-s")
26 banner="false";
27 output="false";;
28 esac
29 done
30
31
32 ## Move to location
33 cd "${location}/"
34
35
36 ## Feedback (-h)
37 [ "${banner}" == "true" ] \
38 && echo "> ${package} ~ ${description}"
39
40
41 ## List output (-v)
42 if [ "${output}" == "true" ]; then
43 if [ "$( which tree )" ]; then
44 tree -d -L 1 --prune --noreport "${location}"
45 else
46 echo "${location}"
47
48 #ls --color
49 find "${location}" -maxdepth 1 -mindepth 1 -type d \
50 | sort \
51 | sed -e 's/[^-][^\/]*\//-/g; s/^/ /; s/-/|/'
52 fi
53 fi
54
55
56 ## Drop to shell (so to "move" with "cd")
57 [ "${OLDPWD}" != "${location}" ] \
58 && eval "${SHELL}"
0 powercat() {
1 kali_treecd "/usr/share/windows-resources/powercat" "powercat" 1 false
2 }
0 debian/helper-script/powercat usr/bin/
0 debian/helper-script/powercat.sh etc/profile.d/
11 powercat.ps1 README.md usr/share/windows-resources/powercat/