diff --git a/README.md b/README.md index e5023bf..5aedd3f 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,15 @@ Video Tutorial: [Install Kinto.sh for Linux in less than a minute](https://www.y +### Quick Install Method + +Paste the following into your Terminal +``` +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)" +``` + +### Old Install Method + 1. clone this repo ``` git clone https://github.com/rbreaves/kinto.git @@ -89,10 +98,14 @@ Video Tutorial: [How to Install Kinto.sh on Windows 10](https://youtu.be/sRk8A8k ### Quick install Open Powershell as Administrator and copy and paste the following. This will download & extract Kinto, install chocolatey, python3 and then install Kinto. +**⚠ NOTE: Please inspect https://raw.githubusercontent.com/rbreaves/kinto/master/install/windows.ps1 and https://chocolatey.org/install.ps1 before running scripts directly. More information about running powershell scripts in this context can be found [here](https://chocolatey.org/install).** + ``` -Invoke-WebRequest -Uri https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -OutFile $env:USERPROFILE\Downloads\kinto.zip;Expand-Archive -LiteralPath "$env:USERPROFILE\Downloads\kinto.zip" -DestinationPath "$env:USERPROFILE\Downloads" -Force;Set-ExecutionPolicy Bypass -Scope Process -Force; iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex; choco install -y python3;cd "$env:USERPROFILE\Downloads\kinto-master";py .\setup.py +Set-ExecutionPolicy Bypass -Scope Process -Force +iwr https://raw.githubusercontent.com/rbreaves/kinto/master/install/windows.ps1 -UseBasicParsing | iex ``` + Update system tray to show Kinto icon at all times (optional) ``` cmd /c "explorer shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}" diff --git a/install/linux.sh b/install/linux.sh new file mode 100755 index 0000000..71f188f --- /dev/null +++ b/install/linux.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)" + +curl https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -J -L -o ~/Downloads/kinto.zip +unzip ~/Downloads/kinto.zip -d ~/Downloads/ +cd ~/Downloads/kinto-master/ + +kintorelease=`curl -s https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \",` +kintohash=`unzip -z ~/Downloads/kinto.zip | tail -n1` +kintoshort=${kintohash::7} + +echo "$kintorelease" "build" "$kintoshort" > ./dl_version + +if [ $# -eq 0 ];then + echo "Installing Kinto..." + ./setup.py +elif [ $1 == "-r" ];then + echo "Uninstall Kinto..." + ./setup.py -r +fi \ No newline at end of file diff --git a/install/windows.ps1 b/install/windows.ps1 new file mode 100644 index 0000000..1d67a84 --- /dev/null +++ b/install/windows.ps1 @@ -0,0 +1,7 @@ +Invoke-WebRequest -Uri https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -OutFile $env:USERPROFILE\Downloads\kinto.zip +Expand-Archive -LiteralPath "$env:USERPROFILE\Downloads\kinto.zip" -DestinationPath "$env:USERPROFILE\Downloads" -Force +Set-ExecutionPolicy Bypass -Scope Process -Force +iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex +choco install -y python3 +cd "$env:USERPROFILE\Downloads\kinto-master" +py .\setup.py \ No newline at end of file diff --git a/xkeysnail_service.sh b/xkeysnail_service.sh index a875eb4..b8b5e7d 100755 --- a/xkeysnail_service.sh +++ b/xkeysnail_service.sh @@ -228,8 +228,6 @@ if [ "$distro" == "manjarolinux" ]; then fi fi -pip3 install pillow - # Add additional shortcuts if needed, does not modify existing ones if [[ $dename == 'gnome' || $dename == 'budgie' ]];then @@ -345,6 +343,10 @@ expsh=" " # echo "Will need to install inotify-tools to restart key remapper live for config file changes..." # sudo ./linux/system-config/unipkg.sh inotify-tools # fi +if ! [ -x "$(command -v git)" ]; then + echo "Will need to install git..." + sudo ./linux/system-config/unipkg.sh git +fi if ! [ -x "$(command -v pip3)" ]; then echo "Will need to install python3-pip..." sudo ./linux/system-config/unipkg.sh python3-pip @@ -372,6 +374,8 @@ if [ "$distro" == 'linuxmint' ]; then pip3 install setuptools fi +pip3 install pillow + # echo "Transferring files..." mkdir -p ~/.config/kinto @@ -396,7 +400,16 @@ yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop # logoff fix - not solid for every os. Prevents missed 1 character input on login # yes | sudo cp -rf linux/gnome_logoff.sh ~/.config/kinto/logoff.sh -echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version +if [ -d "./.git" ] +then + echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version +elif [ -f "./dl_version" ]; then + cp ./dl_version ~/.config/kinto/version +else + # Not a typo - v is built in + echo "ersion Unknown" > ~/.config/kinto/version +fi + yes | cp -rf ./linux/kinto.py ./linux/kinto.py.new yes | cp -rf ./linux/limitedadmins ./linux/limitedadmins.new yes | cp -rf ./linux/gui/ ~/.config/kinto/