Dist deb, rpm

This commit is contained in:
ChristianVisintin 2020-12-06 12:32:53 +01:00
parent 2b51f3c79a
commit d0d19250b6
5 changed files with 106 additions and 37 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
.vscode/ .vscode/
.rpm/
# Created by https://www.gitignore.io/api/rust # Created by https://www.gitignore.io/api/rust
# Edit at https://www.gitignore.io/?templates=rust # Edit at https://www.gitignore.io/?templates=rust

View file

@ -42,3 +42,12 @@ tempfile = "3"
[[bin]] [[bin]]
name = "termscp" name = "termscp"
path = "src/main.rs" path = "src/main.rs"
[package.metadata.rpm]
package = "termscp"
[package.metadata.rpm.cargo]
buildflags = ["--release"]
[package.metadata.rpm.targets]
termscp = { path = "/usr/bin/termscp" }

106
README.md
View file

@ -1,6 +1,6 @@
# TermSCP # 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) [![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) - [About TermSCP](#about-termscp)
- [Why TermSCP](#why-termscp) - [Why TermSCP](#why-termscp)
- [Features](#features) - [Features](#features)
- [Usage](#usage)
- [Installation](#installation) - [Installation](#installation)
- [Cargo](#cargo) - [Cargo 🦀](#cargo-)
- [Deb / Rpm](#deb--rpm) - [Deb package 📦](#deb-package-)
- [Usage](#usage) - [RPM Package 📦](#rpm-package-)
- [Documentation](#documentation) - [Chocolatey 🍫](#chocolatey-)
- [Known issues](#known-issues) - [Brew 🍻](#brew-)
- [Upcoming Features](#upcoming-features) - [Documentation 📚](#documentation-)
- [Contributions](#contributions) - [Known issues 🧻](#known-issues-)
- [Changelog](#changelog) - [Upcoming Features 🧪](#upcoming-features-)
- [License](#license) - [Contributions 🤙🏻](#contributions-)
- [Changelog ⏳](#changelog-)
- [License 📃](#license-)
--- ---
## About TermSCP ## 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 ### 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 ## Features
@ -43,65 +46,94 @@ It happens very often to me when using SCP at work to forget the path of a file
- SFTP - SFTP
- SCP - SCP
- FTP and FTPS - 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 - Written in Rust
- Easy to extend with new protocols - Easy to extend with new file transfers protocols
## Installation ## Usage
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
TermSCP can be started with the following options: TermSCP can be started with the following options:
- `-v, --version` Print version info - `-v, --version` Print version info
- `-h, --help` Print help page - `-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 <https://docs.rs/termscp> The developer documentation can be found on Rust Docs at <https://docs.rs/termscp>
--- ---
## Known issues ## Known issues 🧻
- Ftp: - 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. - 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. - **File viewer**: possibility to show in a popup the file content from the explorer.
--- ---
## Contributions ## Contributions 🤙🏻
Contributions are welcome! 😉 Contributions are welcome! 😉
If you think you can contribute to TermSCP, please follow [TermSCP's contributions guide](CONTRIBUTING.md) 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) 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 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

11
dist/deb.sh vendored Executable file
View file

@ -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 $?

16
dist/rpm.sh vendored Executable file
View file

@ -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 $?