Compare commits
2 Commits
3df3362f28
...
b32cf97e95
Author | SHA1 | Date |
---|---|---|
Sage Vaillancourt | b32cf97e95 | |
Sage Vaillancourt | 48ebb1ea44 |
32
copy.sh
32
copy.sh
|
@ -6,15 +6,21 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
FAKE_HOME="$SCRIPT_DIR/fake_home"
|
FAKE_HOME="$SCRIPT_DIR/fake_home"
|
||||||
export f="$FAKE_HOME"
|
export f="$FAKE_HOME"
|
||||||
|
|
||||||
if ! command -v wget &> /dev/null; then
|
function require {
|
||||||
echo "wget must be installed!"
|
local success=true
|
||||||
|
for comm in "$@"; do
|
||||||
|
if ! command -v "$comm" &> /dev/null; then
|
||||||
|
echo "$comm must be installed!"
|
||||||
|
success=false
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if ! $success; then
|
||||||
|
echo "Missing copy.sh dependencies! Exiting!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if ! command -v curl &> /dev/null; then
|
require git wget curl find jq gron
|
||||||
echo "curl must be installed!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$HOME/.tmp" || exit 1
|
mkdir -p "$HOME/.tmp" || exit 1
|
||||||
|
|
||||||
|
@ -124,6 +130,18 @@ if ! test -f "$HOME/.local/share/fonts/FiraCodeNerdFontMono-Medium.ttf"; then
|
||||||
fc-cache -f -v
|
fc-cache -f -v
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
curdir="$(pwd)"
|
||||||
|
cd $SCRIPT_DIR || exit 1
|
||||||
|
if test -d git-mirror-machine; then
|
||||||
|
cd git-mirror-machine
|
||||||
|
git pull
|
||||||
|
else
|
||||||
|
git clone 'https://git.sagev.space/sage/git-mirror-machine.git'
|
||||||
|
cd git-mirror-machine
|
||||||
|
fi
|
||||||
|
./mirror.sh
|
||||||
|
cd "$curdir" || exit 1
|
||||||
|
|
||||||
if ! command -v fzf &> /dev/null; then
|
if ! command -v fzf &> /dev/null; then
|
||||||
echo "You may wish to install fzf for sofi and other search"
|
echo "You may wish to install fzf for sofi and other search"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue