Compare commits
2 Commits
3df3362f28
...
b32cf97e95
Author | SHA1 | Date |
---|---|---|
Sage Vaillancourt | b32cf97e95 | |
Sage Vaillancourt | 48ebb1ea44 |
30
copy.sh
30
copy.sh
|
@ -6,15 +6,21 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||
FAKE_HOME="$SCRIPT_DIR/fake_home"
|
||||
export f="$FAKE_HOME"
|
||||
|
||||
if ! command -v wget &> /dev/null; then
|
||||
echo "wget must be installed!"
|
||||
function require {
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
||||
if ! command -v curl &> /dev/null; then
|
||||
echo "curl must be installed!"
|
||||
exit 1
|
||||
fi
|
||||
require git wget curl find jq gron
|
||||
|
||||
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
|
||||
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
|
||||
echo "You may wish to install fzf for sofi and other search"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue