mirror of
https://github.com/jarun/advcpmv.git
synced 2026-02-01 13:17:41 +01:00
Merge pull request #12 from abrahammurciano/master
create install script
This commit is contained in:
24
README.md
24
README.md
@@ -10,16 +10,16 @@ advcpmv-0.5-8.21.patch was the last patch released by the author (on February 14
|
|||||||
|
|
||||||
## Build instructions
|
## Build instructions
|
||||||
|
|
||||||
The latest GNU Core Utilities source can be found here: https://ftp.gnu.org/gnu/coreutils/
|
Run the following command to download, patch, compile coreutils and generate the files: `./advcpmv/advcp` and `./advcpmv/advmv`.
|
||||||
|
|
||||||
```
|
```
|
||||||
wget http://ftp.gnu.org/gnu/coreutils/coreutils-9.0.tar.xz
|
curl https://raw.githubusercontent.com/jarun/advcpmv/master/install.sh --create-dirs -o ./advcpmv/install.sh" && (cd advcpmv && sh install.sh)
|
||||||
tar xvJf coreutils-9.0.tar.xz
|
```
|
||||||
cd coreutils-9.0/
|
|
||||||
wget https://raw.githubusercontent.com/jarun/advcpmv/master/advcpmv-0.9-9.0.patch
|
To install an older version than the latest one, you can specify the version by passing it as an argument to the install script (at the end of the command, before the closing parenthesis). For example, if you want to install `advcpmv-0.8-8.32.patch` you would modify the command above like so.
|
||||||
patch -p1 -i advcpmv-0.9-9.0.patch
|
|
||||||
./configure
|
```
|
||||||
make
|
... && (cd advcpmv && sh install.sh 0.8 8.32)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -29,8 +29,8 @@ make
|
|||||||
You can install the binaries and use `cpg -g` and `mvg -g` instead of cp and mv:
|
You can install the binaries and use `cpg -g` and `mvg -g` instead of cp and mv:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo mv ./src/cp /usr/local/bin/cpg
|
sudo mv ./advcpmv/advcp /usr/local/bin/cpg
|
||||||
sudo mv ./src/mv /usr/local/bin/mvg
|
sudo mv ./advcpmv/advmv /usr/local/bin/mvg
|
||||||
```
|
```
|
||||||
|
|
||||||
Progress bar does not work with reflink (introduced v9.0 onwards). So reflink is disabled if using progress bar, left unchanged otherwise.
|
Progress bar does not work with reflink (introduced v9.0 onwards). So reflink is disabled if using progress bar, left unchanged otherwise.
|
||||||
@@ -40,8 +40,8 @@ Progress bar does not work with reflink (introduced v9.0 onwards). So reflink is
|
|||||||
You can install the binaries and create aliases for bash (or whatever you use)
|
You can install the binaries and create aliases for bash (or whatever you use)
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo mv ./src/cp /usr/local/bin/advcp
|
sudo mv ./advcpmv/advcp /usr/local/bin/
|
||||||
sudo mv ./src/mv /usr/local/bin/advmv
|
sudo mv ./advcpmv/advmv /usr/local/bin/
|
||||||
echo alias cp '/usr/local/bin/advcp -g' >> ~/.bashrc
|
echo alias cp '/usr/local/bin/advcp -g' >> ~/.bashrc
|
||||||
echo alias mv '/usr/local/bin/advmv -g' >> ~/.bashrc
|
echo alias mv '/usr/local/bin/advmv -g' >> ~/.bashrc
|
||||||
```
|
```
|
||||||
|
|||||||
20
install.sh
Normal file
20
install.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
ADVCPMV_VERSION=${1:-0.9}
|
||||||
|
CORE_UTILS_VERSION=${2:-9.0}
|
||||||
|
|
||||||
|
wget http://ftp.gnu.org/gnu/coreutils/coreutils-$CORE_UTILS_VERSION.tar.xz
|
||||||
|
tar xvJf coreutils-$CORE_UTILS_VERSION.tar.xz
|
||||||
|
rm coreutils-$CORE_UTILS_VERSION.tar.xz
|
||||||
|
(
|
||||||
|
cd coreutils-$CORE_UTILS_VERSION/
|
||||||
|
wget https://raw.githubusercontent.com/jarun/advcpmv/master/advcpmv-$ADVCPMV_VERSION-$CORE_UTILS_VERSION.patch
|
||||||
|
patch -p1 -i advcpmv-$ADVCPMV_VERSION-$CORE_UTILS_VERSION.patch
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
cp ./src/cp ../advcp
|
||||||
|
cp ./src/mv ../advmv
|
||||||
|
)
|
||||||
|
rm -rf coreutils-$CORE_UTILS_VERSION
|
||||||
Reference in New Issue
Block a user