File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change
1
+ dotfiles_src_dir : ~/src
2
+ dotfiles_git_repos :
3
+ -
src :
[email protected] :coder/coder
4
+ dest : ~/src/coder
5
+ version : main
6
+ dotfiles_packages : [] # all present in image
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
- #! /usr/bin/env bash
3
2
4
3
set -euo pipefail
5
4
6
5
[[ -z " ${VERBOSE:- } " ]] || set -x
7
6
8
7
REPO_ROOT=$( git rev-parse --show-toplevel)
9
8
9
+ # Ensure python3 is available
10
+ if ! command -v python3; then
11
+ echo " INFO: installing python3"
12
+ DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -y python3 python3-virtualenv python3-apt
13
+ fi
14
+
15
+ # Ensure virtualenv is available
16
+ if ! command -v virtualenv; then
17
+ echo " INFO: installing virtualenv"
18
+ DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -y python3-virtualenv
19
+ fi
20
+
10
21
# Create a virtualenv
11
22
if [[ ! -d " ${REPO_ROOT} /.venv" ]]; then
12
23
echo " INFO: Creating virtualenv"
13
- python3 -m venv " ${REPO_ROOT} /.venv"
24
+ virtualenv " ${REPO_ROOT} /.venv"
14
25
fi
15
26
16
27
# Activate the virtualenv
You can’t perform that action at this time.
0 commit comments