<commit_before>rem -*- Mode: dos -*-
rem xr-install-emacs.bat --- install emacs (xr style)
rem Copyright (C) 2015  <NAME> (dan.harms)
rem Author: <NAME> <<EMAIL>>
rem Created: Thursday, May 21, 2015
rem Version: 1.0
rem Modified Time-stamp: <2015-11-18 14:03:52 dan.harms>
rem Modified by: <NAME>
rem Keywords: install perfect editor

@echo off
setlocal
setlocal enabledelayedexpansion


set verbose=
if not %1. == . (
    set verbose=v
)

set tar=c:\msys\1.0\bin\tar
set emacs=c:\emacs-24.4\bin\emacs
set user=%USERNAME%
set timeout=c:\Windows\System32\timeout
set orig_dir=%cd%
set script_dir=%~dp0
set int=emacs.tar
set manifest=.bk_manifest
set backup=emacs_bk.tar

if "%HOME%". == . (
    echo "HOME directory undefined, aborting."
    exit /b
)

if exist %int% (
    del %int%
)

echo Tarring .emacs.d into %int%...
%tar% c%verbose%f %int% --exclude=*.elc .emacs.d
%tar% u%verbose%f %int% --transform=s$xr/$$ xr/.emacs.d

cd %HOME%
if exist .emacs.d (
    if exist %backup% del %backup%
    for /f %%i in (%orig_dir%\.emacs.d\%manifest%) do (
        call :backup %%i %backup%
    )
    %timeout% /t 2
    rmdir .emacs.d /s /q
    mkdir .emacs.d
    if exist %backup% (
        %tar% -xvpf %backup% --overwrite
        del %backup%
    )<commit_msg>Allow host-specific overrides when installing emacs on windows<commit_after>rem -*- Mode: dos -*-
rem xr-install-emacs.bat --- install emacs (xr style)
rem Copyright (C) 2015  <NAME> (dan.harms)
rem Author: <NAME> <<EMAIL>>
rem Created: Thursday, May 21, 2015
rem Version: 1.0
rem Modified Time-stamp: <2015-11-19 09:46:42 dan.harms>
rem Modified by: <NAME>
rem Keywords: install perfect editor

@echo off
setlocal
setlocal enabledelayedexpansion


set verbose=
if not %1. == . (
    set verbose=v
)

set tar=c:\msys\1.0\bin\tar
set emacs=c:\emacs-24.4\bin\emacs
set user=%USERNAME%
set timeout=c:\Windows\System32\timeout
set orig_dir=%cd%
set script_dir=%~dp0
set int=emacs.tar
set manifest=.bk_manifest
set backup=emacs_bk.tar

for /f "usebackq" %%i in (`hostname`) do set host=%%i

if "%HOME%". == . (
    echo "HOME directory undefined, aborting."
    exit /b
)

if exist %int% (
    del %int%
)

echo Tarring .emacs.d into %int%...
%tar% c%verbose%f %int% --exclude=*.elc .emacs.d
%tar% u%verbose%f %int% --transform=s$xr/$$ xr/.emacs.d
%tar% u%verbose%f %int% --transform=s$%host%/$$ %host%/.emacs.d

cd %HOME%
if exist .emacs.d (
    if exist %backup% del %backup%
    for /f %%i in (%orig_dir%\.emacs.d\%manifest%) do (
        call :backup %%i %backup%
    )
    %timeout% /t 2
    rmdir .emacs.d /s /q
    mkdir .emacs.d
    if exist %backup% (
        %tar% -xvpf %backup% --overwrite
        del %backup%
    )
{'fraction_non_alphanumeric': 0.1631814787154593, 'fraction_numerical': 0.0268857356235997, 'mean_word_length': 3.12788906009245, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1847261', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1035, 'n_words': 301}