Skip to content

Instantly share code, notes, and snippets.

@wangjiezhe
Last active October 23, 2022 22:42
Show Gist options
  • Save wangjiezhe/b978fc93b62e75bfad9c to your computer and use it in GitHub Desktop.
Save wangjiezhe/b978fc93b62e75bfad9c to your computer and use it in GitHub Desktop.

Revisions

  1. wangjiezhe revised this gist Apr 2, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions advcp_install.sh
    Original file line number Diff line number Diff line change
    @@ -26,3 +26,5 @@ sudo install -Dm 755 "${PWD}"/src/mv /usr/local/bin/amv

    echo "Installation succeeded!"
    echo "Don't forget to add \"alias cp='acp -g'\" and \"alias mv='amv -g'\" in your bashrc!"

    rm -rf ${tmpdir}
  2. wangjiezhe revised this gist Apr 1, 2015. 1 changed file with 0 additions and 0 deletions.
    Empty file modified advcp_install.sh
    100644 → 100755
    Empty file.
  3. wangjiezhe revised this gist Oct 25, 2014. 1 changed file with 11 additions and 7 deletions.
    18 changes: 11 additions & 7 deletions advcp_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,24 +1,28 @@
    #!/bin/bash
    #!/usr/bin/env bash
    set -e

    tmpdir=$(mktemp -t -d advcp.XXXXXX)
    cd ${tmpdir}

    wget https://aur.archlinux.org/packages/ad/advcp/advcp.tar.gz
    tar -zxvf advcp.tar.gz
    tar xf advcp.tar.gz

    source advcp/PKGBUILD

    wget http://ftp.gnu.org/gnu/coreutils/coreutils-"${_pkgver}".tar.xz
    tar -Jxvf coreutils-"${_pkgver}".tar.xz
    tar xf coreutils-"${_pkgver}".tar.xz

    cd coreutils-"${_pkgver}"

    printf "Patching...\n"
    echo "[1mPatching...[0m"
    patch -p1 -i ../advcp/advcpmv-"${_pkgver}"_"${pkgver}".patch || exit 1

    printf "Start making...\n"
    echo "[1mStart making...[0m"
    ./configure || exit 1
    make || exit 1

    sudo install -Dm 755 "${PWD}"/src/cp /usr/local/bin/acp
    sudo install -Dm 755 "${PWD}"/src/mv /usr/local/bin/amv

    printf "Installation succeeded!\n"
    printf "Don't forget to add \"alias cp='acp -g'\" and \"alias mv='amv -g'\" in your bashrc!\n"
    echo "[1mInstallation succeeded![0m"
    echo "[1mDon't forget to add \"alias cp='acp -g'\" and \"alias mv='amv -g'\" in your bashrc![0m"
  4. wangjiezhe revised this gist Sep 11, 2014. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions advcp_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,24 +1,24 @@
    #!/bin/bash

    pkgver=0.5.4
    _coreutilver=8.21

    wget http://ftp.gnu.org/gnu/coreutils/coreutils-${_coreutilver}.tar.xz{,.sig}
    wget https://aur.archlinux.org/packages/ad/advcp/advcp.tar.gz
    tar -Jxvf coreutils-${_coreutilver}.tar.xz
    tar -zxvf advcp.tar.gz

    cd coreutils-${_coreutilver}
    source advcp/PKGBUILD

    wget http://ftp.gnu.org/gnu/coreutils/coreutils-"${_pkgver}".tar.xz
    tar -Jxvf coreutils-"${_pkgver}".tar.xz

    cd coreutils-"${_pkgver}"

    print "Patching..."
    patch -p1 -i ../advcp/advcpmv-${_coreutilver}_${pkgver}.patch || exit 1
    printf "Patching...\n"
    patch -p1 -i ../advcp/advcpmv-"${_pkgver}"_"${pkgver}".patch || exit 1

    print "Start making..."
    printf "Start making...\n"
    ./configure || exit 1
    make || exit 1

    sudo install -Dm 755 "${PWD}"/src/cp /usr/local/bin/acp
    sudo install -Dm 755 "${PWD}"/src/mv /usr/local/bin/amv

    print "Installation succeeded!"
    print "Don't forget to add \"alias cp='acp -g'\" and \"alias mv='amv -g'\" in your bashrc!"
    printf "Installation succeeded!\n"
    printf "Don't forget to add \"alias cp='acp -g'\" and \"alias mv='amv -g'\" in your bashrc!\n"
  5. wangjiezhe created this gist Sep 11, 2014.
    24 changes: 24 additions & 0 deletions advcp_install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    #!/bin/bash

    pkgver=0.5.4
    _coreutilver=8.21

    wget http://ftp.gnu.org/gnu/coreutils/coreutils-${_coreutilver}.tar.xz{,.sig}
    wget https://aur.archlinux.org/packages/ad/advcp/advcp.tar.gz
    tar -Jxvf coreutils-${_coreutilver}.tar.xz
    tar -zxvf advcp.tar.gz

    cd coreutils-${_coreutilver}

    print "Patching..."
    patch -p1 -i ../advcp/advcpmv-${_coreutilver}_${pkgver}.patch || exit 1

    print "Start making..."
    ./configure || exit 1
    make || exit 1

    sudo install -Dm 755 "${PWD}"/src/cp /usr/local/bin/acp
    sudo install -Dm 755 "${PWD}"/src/mv /usr/local/bin/amv

    print "Installation succeeded!"
    print "Don't forget to add \"alias cp='acp -g'\" and \"alias mv='amv -g'\" in your bashrc!"