Skip to content
Snippets Groups Projects
Commit f55273aa authored by Tobias Stein's avatar Tobias Stein
Browse files

Added auto clone-or-pull for the main repo

parent 02ccd45e
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@
- python3-venv
roles:
- git-clone-or-pull
- jupyter-lab
- ml-python-packages
- misc-applications
#!/bin/bash
GIT_URL="https://code.fbi.h-da.de/pse-ai-at-the-edge/ai-at-the-edge.git"
DIRECTORY_NAME="ai-at-the-edge"
CLONE_DIRECTORY="$HOME/notebooks"
mkdir -p $CLONE_DIRECTORY
cd $CLONE_DIRECTORY
if test -d "$DIRECTORY_NAME"; then
# directory already exists. Just pull to update
cd $DIRECTORY_NAME
git pull
else
# directory does not exist. Clone the repo
git clone $GIT_URL
fi
\ No newline at end of file
---
# roles/git-clone-or-pull
- name: Copy clone-or-pull script to remote fs
copy:
mode: u=rwx,g=rx,o=rx
src: files/clone-or-pull.sh
dest: /tmp/clone-or-pull.sh
- name:
become: true
become_user: "{{ target_user }}"
shell: "bash /tmp/clone-or-pull.sh"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment