From d0d19250b6e25a5d0e9cf094fef10015a64aba1c Mon Sep 17 00:00:00 2001 From: ChristianVisintin Date: Sun, 6 Dec 2020 12:32:53 +0100 Subject: [PATCH] Dist deb, rpm --- .gitignore | 1 + Cargo.toml | 9 +++++ README.md | 106 ++++++++++++++++++++++++++++++++++------------------ dist/deb.sh | 11 ++++++ dist/rpm.sh | 16 ++++++++ 5 files changed, 106 insertions(+), 37 deletions(-) create mode 100755 dist/deb.sh create mode 100755 dist/rpm.sh diff --git a/.gitignore b/.gitignore index a9be566..24397ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vscode/ +.rpm/ # Created by https://www.gitignore.io/api/rust # Edit at https://www.gitignore.io/?templates=rust diff --git a/Cargo.toml b/Cargo.toml index a9ba3c0..bfcb7b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,3 +42,12 @@ tempfile = "3" [[bin]] name = "termscp" path = "src/main.rs" + +[package.metadata.rpm] +package = "termscp" + +[package.metadata.rpm.cargo] +buildflags = ["--release"] + +[package.metadata.rpm.targets] +termscp = { path = "/usr/bin/termscp" } diff --git a/README.md b/README.md index a53ad34..c304e98 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TermSCP -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Stars](https://img.shields.io/github/stars/ChristianVisintin/TermSCP.svg)](https://github.com/ChristianVisintin/TermSCP) [![Issues](https://img.shields.io/github/issues/ChristianVisintin/TermSCP.svg)](https://github.com/ChristianVisintin/TermSCP/issues) [![Downloads](https://img.shields.io/crates/d/termscp.svg)](https://crates.io/crates/termscp) [![Crates.io](https://img.shields.io/badge/crates.io-v0.1.0-orange.svg)](https://crates.io/crates/termscp) +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Stars](https://img.shields.io/github/stars/ChristianVisintin/TermSCP.svg)](https://github.com/ChristianVisintin/TermSCP) [![Issues](https://img.shields.io/github/issues/ChristianVisintin/TermSCP.svg)](https://github.com/ChristianVisintin/TermSCP/issues) [![Downloads](https://img.shields.io/crates/d/termscp.svg)](https://crates.io/crates/termscp) [![Crates.io](https://img.shields.io/badge/crates.io-v0.1.0-orange.svg)](https://crates.io/crates/termscp) [![Docs](https://docs.rs/termscp/badge.svg)](https://docs.rs/termscp) [![Build](https://github.com/ChristianVisintin/TermSCP/workflows/Linux/badge.svg)](https://github.com/ChristianVisintin/TermSCP/actions) [![Build](https://github.com/ChristianVisintin/TermSCP/workflows/MacOS/badge.svg)](https://github.com/ChristianVisintin/TermSCP/actions) [![Build](https://github.com/ChristianVisintin/TermSCP/workflows/Windows/badge.svg)](https://github.com/ChristianVisintin/TermSCP/actions) @@ -16,26 +16,29 @@ Current version: 0.1.0 (??/??/2020) - [About TermSCP](#about-termscp) - [Why TermSCP](#why-termscp) - [Features](#features) + - [Usage](#usage) - [Installation](#installation) - - [Cargo](#cargo) - - [Deb / Rpm](#deb--rpm) - - [Usage](#usage) - - [Documentation](#documentation) - - [Known issues](#known-issues) - - [Upcoming Features](#upcoming-features) - - [Contributions](#contributions) - - [Changelog](#changelog) - - [License](#license) + - [Cargo ๐Ÿฆ€](#cargo-) + - [Deb package ๐Ÿ“ฆ](#deb-package-) + - [RPM Package ๐Ÿ“ฆ](#rpm-package-) + - [Chocolatey ๐Ÿซ](#chocolatey-) + - [Brew ๐Ÿป](#brew-) + - [Documentation ๐Ÿ“š](#documentation-) + - [Known issues ๐Ÿงป](#known-issues-) + - [Upcoming Features ๐Ÿงช](#upcoming-features-) + - [Contributions ๐Ÿค™๐Ÿป](#contributions-) + - [Changelog โณ](#changelog-) + - [License ๐Ÿ“ƒ](#license-) --- ## About TermSCP -TermSCP is basically a porting of WinSCP to terminal. So basically is a terminal tool with an UI to connect to a remote server to retrieve and upload files. It works both on **Linux**, **MacOS**, **UNIX** and **Windows** too and supports SFTP, SCP, FTP and FTPS. +TermSCP is basically a porting of WinSCP to terminal. So basically is a terminal utility with an TUI to connect to a remote server to retrieve and upload files and to interact with the local file system. It works both on **Linux**, **MacOS**, **UNIX** and **Windows** and supports SFTP, SCP, FTP and FTPS. ### Why TermSCP -It happens very often to me when using SCP at work to forget the path of a file on a remote machine, which forces me then to connect through SSH, gather the file path and finally download it through SCP. I could use WinSCP, but I use Linux and I pratically use the terminal for everything, so I wanted something like WinSCP on my terminal. +It happens very often to me, when using SCP at work to forget the path of a file on a remote machine, which forces me then to connect through SSH, gather the file path and finally download it through SCP. I could use WinSCP, but I use Linux and I pratically use the terminal for everything, so I wanted something like WinSCP on my terminal. Yeah, I know there midnight commander too, but actually I don't like it very much tbh (and doesn't support scp). ## Features @@ -43,65 +46,94 @@ It happens very often to me when using SCP at work to forget the path of a file - SFTP - SCP - FTP and FTPS -- Practical user interface to explore the remote machine file system and to select the files to upload and download +- Practical user interface to explore and operate on the remote and on the local machine file system +- Compatible with Windows, Linux, UNIX and MacOS - Written in Rust -- Easy to extend with new protocols +- Easy to extend with new file transfers protocols -## Installation - -If you're considering to install TermSCP I want to thank you ๐Ÿ’› ! I hope this project can be useful for you! -If you want to contribute to this project, don't forget to check out our contribute guide. [Read More](CONTRIBUTING.md) - -### Cargo - -```sh -# Install termscp through cargo -cargo install termscp -``` - -### Deb / Rpm - -Coming soon - -### Usage +## Usage TermSCP can be started with the following options: - `-v, --version` Print version info - `-h, --help` Print help page -## Documentation +--- + +## Installation + +If you're considering to install TermSCP I want to thank you ๐Ÿ’› ! I hope you will enjoy TermSCP! +If you want to contribute to this project, don't forget to check out our contribute guide. [Read More](CONTRIBUTING.md) + +### Cargo ๐Ÿฆ€ + +```sh +# Install termscp through cargo +cargo install termscp +``` + +### Deb package ๐Ÿ“ฆ + +Get `deb` package from [HERE](https://github.com/ChristianVisintin/TermSCP/releases/download/v0.1.0/termscp_0.1.0_amd64.deb) +or run `wget https://github.com/ChristianVisintin/TermSCP/releases/download/v0.1.0/termscp_0.1.0_amd64.deb` + +then install through dpkg: + +```sh +dpkg -i termscp_*.deb +# Or even better with gdebi +gdebi termscp_*.deb +``` + +### RPM Package ๐Ÿ“ฆ + +Get `rpm` package from [HERE](https://github.com/ChristianVisintin/TermSCP/releases/download/v0.1.0/termscp-0.1.0-1.x86_64.rpm) +or run `wget https://github.com/ChristianVisintin/TermSCP/releases/download/v0.1.0/termscp-0.1.0-1.x86_64.rpm` + +then install through rpm: + +```sh +rpm -U termscp_*.rpm +``` + +### Chocolatey ๐Ÿซ + +### Brew ๐Ÿป + +--- + +## Documentation ๐Ÿ“š The developer documentation can be found on Rust Docs at --- -## Known issues +## Known issues ๐Ÿงป - Ftp: - Time in explorer is `1 Jan 1970`, but shouldn't be: that's because chrono can't parse date in a different locale. So if your server has a locale different from the one on your machine, it won't be able to parse the date. --- -## Upcoming Features +## Upcoming Features ๐Ÿงช - **File viewer**: possibility to show in a popup the file content from the explorer. --- -## Contributions +## Contributions ๐Ÿค™๐Ÿป Contributions are welcome! ๐Ÿ˜‰ If you think you can contribute to TermSCP, please follow [TermSCP's contributions guide](CONTRIBUTING.md) -## Changelog +## Changelog โณ See the enire changelog [HERE](CHANGELOG.md) --- -## License +## License ๐Ÿ“ƒ Licensed under the GNU GPLv3 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/dist/deb.sh b/dist/deb.sh new file mode 100755 index 0000000..82b64c4 --- /dev/null +++ b/dist/deb.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Installing cargo-deb..." +cargo install cargo-deb +if [ ! -f "Cargo.toml" ]; then + echo "Yout must be in the project root directory" + exit 1 +fi +echo "Running cargo-deb" +cargo deb +exit $? diff --git a/dist/rpm.sh b/dist/rpm.sh new file mode 100755 index 0000000..ff79572 --- /dev/null +++ b/dist/rpm.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +which rpmbuild > /dev/null +if [ $? -ne 0 ]; then + echo "You must install rpmbuild on your machine" +fi +echo "Installing cargo-rpm..." +cargo install cargo-rpm +if [ ! -f "Cargo.toml" ]; then + echo "Yout must be in the project root directory" + exit 1 +fi +echo "Running cargo-rpm" +cargo rpm init +cargo rpm build +exit $?