fix arm profile setup if it already exists

This commit is contained in:
dodgejcr 2020-02-08 23:50:17 -06:00
parent 0f23a7333a
commit 9a7f5fbe55
1 changed files with 6 additions and 4 deletions

View File

@ -96,14 +96,16 @@ show_elapsed_time(){
getarmprofiles () { getarmprofiles () {
info "Getting package lists ready for $DEVICE $EDITION edition..." info "Getting package lists ready for $DEVICE $EDITION edition..."
if ls $TMPDIR/arm-profiles/* 1> /dev/null 2>&1; then
if [ -d "$TMPDIR/arm-profiles/" ];
then
cd $TMPDIR/arm-profiles cd $TMPDIR/arm-profiles
git pull 1> /dev/null 2>&1 git fetch origin 1> /dev/null 2>&1
git reset --hard origin/master 1> /dev/null 2>&1
else else
mkdir -p $TMPDIR mkdir -p $TMPDIR
chmod 777 $TMPDIR chmod 777 $TMPDIR
cd $TMPDIR git clone https://gitlab.manjaro.org/manjaro-arm/applications/arm-profiles.git $TMPDIR/arm-profiles/ 1> /dev/null 2>&1
git clone https://gitlab.manjaro.org/manjaro-arm/applications/arm-profiles.git 1> /dev/null 2>&1
fi fi
} }