1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-22 16:45:40 +01:00

Merge pull request #180 from ChaosZero112/patch-1

Check for unzip
This commit is contained in:
Anthony Scopatz 2018-07-14 21:18:21 -05:00 committed by GitHub
commit 52f233749e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,11 @@
#!/bin/sh #!/bin/sh
# check for unzip before we continue
if [ ! "$(command -v unzip)" ]; then
echo 'unzip is required but was not found. Install unzip first and then run this script again.' >&2
exit 1
fi
_fetch_sources(){ _fetch_sources(){
wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip
if [ ! -d ~/.nano/ ] if [ ! -d ~/.nano/ ]
@ -8,7 +14,6 @@ _fetch_sources(){
fi fi
cd ~/.nano/ || exit cd ~/.nano/ || exit
unzip -o "/tmp/nanorc.zip" unzip -o "/tmp/nanorc.zip"
mv nanorc-master/* ./ mv nanorc-master/* ./
rm -rf nanorc-master rm -rf nanorc-master