add license, fix gitlab ci, new installation method
parent
97e90ca385
commit
6f13ea7915
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Volkor The Barbarian Warrior
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -0,0 +1,8 @@
|
||||
install:
|
||||
type curl && type jq || exit 1
|
||||
mkdir -p $(DESTDIR)/usr/bin
|
||||
install -m 0755 supload.sh $(DESTDIR)/usr/local/bin/supload
|
||||
install -m 0755 supload.conf $(DESTDIR)/etc/supload.conf
|
||||
|
||||
uninstall:
|
||||
rm $(DESTDIR)/usr/bin/supload
|
@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
r=$(tput smso)
|
||||
b=$(tput bold)
|
||||
n=$(tput sgr0)
|
||||
red=$(tput setaf 1)
|
||||
|
||||
check_dep() {
|
||||
type $@ >/dev/null 2>&1 || { echo >&2 "I require "$@" but it's not installed. Aborting."; exit 1; }
|
||||
}
|
||||
check_opt() {
|
||||
type $@ >/dev/null 2>&1 || { echo >&2 "I recommend you install "$@" for full functionality"; }
|
||||
}
|
||||
|
||||
install() {
|
||||
if sudo ln -s $PWD/supload.sh /usr/bin/supload ; then
|
||||
echo "Installation Successful, You can now use the command 'supload'!'"
|
||||
exit 0
|
||||
else
|
||||
while true; do # Fixing menu
|
||||
options=("${r}D${n}elete the current file at /usr/bin/supload and reinstall (Not recommended)" \
|
||||
"${r}U${n}se an alternative name for SUpload (Recommended)" \
|
||||
"${r}E${n}xit and give up like a little baby.")
|
||||
PS3="${red}Failed to create symbolic link.${n} Enter an option [1,2,3/D,U,E]"
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $REPLY in
|
||||
1 | [Dd]*) sudo rm /usr/bin/supload; install ;;
|
||||
2 | [Uu]*) read -p "What name would you want to use (cumload, upload, cumzone, supload)" newname; sudo ln -s $PWD/supload.sh /usr/bin/$newname; echo "Installation Successful, You can now use the command '"$newname"'!"; exit ;;
|
||||
3 | [Ee]*) echo "you baby"; exit ;;
|
||||
*) echo "Invalid Option!" ;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
clear
|
||||
check_dep curl
|
||||
check_dep jq
|
||||
check_opt scrot
|
||||
check_opt xclip
|
||||
check_opt notify-send
|
||||
install
|
Loading…
Reference in New Issue