aboutsummaryrefslogtreecommitdiff
path: root/src/is_updated.cc
blob: b2c3b43a138e77c282851f5bc16f1575a4e8b590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <filesystem>

#include "is_updated.hh"
#include "cmd_out.hh"

bool is_updated(std::string src) {
  if (src != std::filesystem::current_path().string()) {
		if (!std::filesystem::exists(src)) { return false; }
    std::filesystem::current_path(src);
  }
  if (cmd_out("git pull") == "Already up to date.") { return true; }
  return false;
}