diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index 5f2317b..08467df 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -46,6 +46,7 @@ function gitclone() { if [ -d "/opt/${repo}" ]; then echo "${repo} existiert bereits!!!" cd /opt/${repo} + git reset --hard git pull else git clone ${WEBADDRESS} /opt/${repo} @@ -53,6 +54,7 @@ function gitclone() { if [ -d "/opt/${repo1}" ]; then echo "${repo1} existiert bereits!!!" cd /opt/${repo1} + git reset --hard git pull else git clone ${WEBADDRESS1} /opt/${repo1} @@ -695,6 +697,7 @@ if [ "$version" != "lite" ] && [ "$skip" != "skip" ]; then if [ -d /opt/beautysh ];then echo "Bereits vorhanden!!!" cd /opt/beautysh + git reset --hard git pull else git clone https://github.com/bemeurer/beautysh /opt/beautysh @@ -715,6 +718,7 @@ if [ "$version" != "lite" ] && [ "$skip" != "skip" ]; then if [ -d /opt/powerline-shell-fonts ];then echo "Bereits vorhanden!!!" cd /opt/powerline-shell-fonts + git reset --hard git pull else git clone https://github.com/powerline/fonts.git /opt/powerline-shell-fonts @@ -727,6 +731,7 @@ if [ "$version" != "lite" ] && [ "$skip" != "skip" ]; then if [ -d /opt/uncrustify ];then echo "Bereits vorhanden!!!" cd /opt/uncrustify + git reset --hard git pull else git clone https://github.com/uncrustify/uncrustify.git /opt/uncrustify @@ -748,6 +753,7 @@ if [ "$version" != "lite" ] && [ "$skip" != "skip" ]; then if [ -d /opt/conky ];then echo "Bereits vorhanden!!!" cd /opt/conky + git reset --hard git pull else git clone https://github.com/brndnmtthws/conky.git /opt/conky diff --git a/arch-install b/arch-install index 0dc625f..ab552f7 100755 --- a/arch-install +++ b/arch-install @@ -105,6 +105,7 @@ function gitclone() { if [ -d "/opt/${repo}" ]; then echo "${repo} already exists!!!" cd /opt/${repo} + git reset --hard git pull else git clone ${WEBADDRESS} /opt/${repo} diff --git a/aurinstall.sh b/aurinstall.sh index bf24e78..6118322 100755 --- a/aurinstall.sh +++ b/aurinstall.sh @@ -7,21 +7,32 @@ url1=${url%.*} url2=${url1#*//} packagename=${url2#*/} +function aurinstaller() { + if git clone ${url}; then + echo "git erfolgreich runtergeladen!!!" + else + echo "verändere URL zum erfolgreichen herunterladen!!!" + git clone "https://aur.archlinux.org/${url}.git" + fi + cd ${packagename} + + +} + cd pwd if [ -d ${packagename} ];then - echo "Bereits vorhanden!!!" - cd ${packagename} - git reset --hard - git pull + echo "Bereits vorhanden!!!" + cd ${packagename} + git reset --hard + if ! git pull; then + cd + pwd + rm -Rv ${packagename} + aurinstaller + fi else - if git clone ${url}; then - echo "git erfolgreich runtergeladen!!!" - else - echo "verändere URL zum erfolgreichen herunterladen!!!" - git clone "https://aur.archlinux.org/${url}.git" - fi - cd ${packagename} + aurinstaller fi makepkg -si --skipchecksums --skippgpcheck --nocheck --noconfirm --install --needed diff --git a/update.sh b/update.sh index 8af63ad..9630acd 100755 --- a/update.sh +++ b/update.sh @@ -24,6 +24,7 @@ function gitclone() { if [ -d "/opt/${repo}" ]; then echo "${repo} existiert bereits!!!" cd /opt/${repo} + git reset --hard git pull else git clone ${WEBADDRESS} /opt/${repo}