PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Git Get for github it downloads github repos auto with bash

Go down

Git Get for github it downloads github repos auto with bash Empty Git Get for github it downloads github repos auto with bash

Post by jamied_uk 3rd October 2020, 16:32

Code:
#!/bin/bash
# (c) J~Net 2020
#
# jnet.sytes.net
#
# Example to run make executable then type:
# ./run.sh
#
#
# https://jnet.forumotion.com/t1714-git-get-for-github-it-downloads-github-repos-auto-with-bash#2656
server="server" # Server Name
username="username" # administrator
password="password" # password
share="NETWORK" # Share Name
filename="GITHUB.txt" # File Name
path="/home/$USER/Documents/Scripts/BASH/Get_Git/" # Path to copy filename to.
installpath="/home/$USER/Documents/Scripts/"
fallback="https://raw.githubusercontent.com/jamieduk/git_get/main/GITHUB.txt"
#
echo "Welcome To Git Get By J~Net 2020 jnet.sytes.net"
echo "Copying File Over Ready For DL"
echo ""
# smbclient '//windowsserver/c$' -c 'lcd /tmp; cd Directory; get file.txt' -U administrator%password
smbclient "//$server/$share" -c "lcd $path; cd Directory; get $filename" -U $username%$password
#
#cd $installpath
if [ ! -e "$filename" ]; then
    echo "File does not exist"
    echo "FallBack Mode Activated!"
    wget $fallback
else
    echo "File Ready!"
fi

while IFS="" read -r p || [ -n "$p" ]
do
  $p # git clone
 
done < $filename
#
echo "All Commands Have Been Ran!"
#
#
# rm $filename


Last edited by jamied_uk on 3rd October 2020, 21:28; edited 3 times in total
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Git Get for github it downloads github repos auto with bash Empty Re: Git Get for github it downloads github repos auto with bash

Post by jamied_uk 3rd October 2020, 17:41

Or use git / Github

Code:
git clone https://github.com/jamieduk/git_get.git
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Git Get for github it downloads github repos auto with bash Empty Re: Git Get for github it downloads github repos auto with bash

Post by jamied_uk 3rd October 2020, 21:29

jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum