WIP and add nope opener utility
This commit is contained in:
parent
04f950a799
commit
d100183b5c
3 changed files with 32 additions and 0 deletions
2
Makefile
2
Makefile
|
|
@ -2,7 +2,9 @@ PREFIX=$(HOME)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -Dm755 youtube-mp3 $(DESTDIR)$(PREFIX)/bin/youtube-mp3
|
install -Dm755 youtube-mp3 $(DESTDIR)$(PREFIX)/bin/youtube-mp3
|
||||||
|
install -Dm755 nope $(DESTDIR)$(PREFIX)/bin/nope
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(RM) $(DESTDIR)$(PREFIX)/bin/youtube-mp3
|
$(RM) $(DESTDIR)$(PREFIX)/bin/youtube-mp3
|
||||||
|
$(RM) $(DESTDIR)$(PREFIX)/bin/nope
|
||||||
|
|
||||||
|
|
|
||||||
26
nope
Executable file
26
nope
Executable file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo nope
|
||||||
|
echo opens files
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
--help)
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*.pdf)
|
||||||
|
okular $1 > /dev/null 2>&1 &
|
||||||
|
;;
|
||||||
|
*.html)
|
||||||
|
firefox $1 > /dev/null 2>&1 &
|
||||||
|
;;
|
||||||
|
*.mp4|*.mp3)
|
||||||
|
vlc $1 > /dev/null 2>&1 &
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "No rule for opening this file has been specified"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo youtube-mp3
|
||||||
|
}
|
||||||
|
|
||||||
# Check for youtube-dl in path
|
# Check for youtube-dl in path
|
||||||
if ! (which youtube-dl) ; then
|
if ! (which youtube-dl) ; then
|
||||||
echo "No youtube-dl found in path"
|
echo "No youtube-dl found in path"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue