Skip to content

Commit

Permalink
Merge pull request #37 from plotly/0_9_3p
Browse files Browse the repository at this point in the history
Save original sources.list before overriding and restore it at the end.
  • Loading branch information
josegonzalez authored Nov 16, 2019
2 parents ac141aa + d4934fc commit 1f06cde
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ if [ -d $DIR/apt-preferences ]; then
fi
if [ -f $DIR/apt-sources-list ]; then
echo "-----> Using customized sources.list"
mv -v /etc/apt/sources.list /etc/apt/sources.list.orig
mv -v $DIR/apt-sources-list /etc/apt/sources.list
fi
if [ -f $DIR/apt-repositories ]; then
Expand Down Expand Up @@ -104,6 +105,12 @@ if [ -d $DIR/dpkg-packages ]; then
echo "-----> Injecting packages: \$PACKAGES"
dpkg -i \$PACKAGES
fi
if [ -f /etc/apt/sources.list.orig ]; then
echo "-----> Restoring original sources.list"
mv -v /etc/apt/sources.list.orig /etc/apt/sources.list
fi
rm -rf /tmp/apt
sleep 1 # wait so that docker run has not exited before docker attach
EOF
Expand Down

0 comments on commit 1f06cde

Please sign in to comment.